2
$\begingroup$

I have been struggling for over an hour, reading documentation, experimenting, google searching for information on how to ask for the closing price of the NASDAQ index. I don't want a stock on that index, I want the daily closing prices of the index itself. No stock name, no entity, no entity class that I have tried seems to work. Is this even possible?

$\endgroup$
4
  • $\begingroup$ According to the documentation, this should work FinancialData["^IXIC"] but it does not. There are a lot of issues with FinancialData. e.g. see this. $\endgroup$ Mar 3, 2020 at 20:44
  • $\begingroup$ @RohitNamjoshi -- yes, I tried that and other variations. Some of those seems to be known quantities but nothing is produced reported by Missing[NotAvailable]. But, for others an error is produced saying that the entity name, class, etc. is not known. I have had problems with FinancialData before, enough that for awhile I went directly to Yahoo via Python/SQL scripts which seemed to work better but definitely not nice as if it were integrated into Mathematica. $\endgroup$
    – K7PEH
    Mar 3, 2020 at 22:14
  • $\begingroup$ Perhaps this might help: Financial data from Quandl in Wolfram Language using QuandlLink $\endgroup$ Mar 4, 2020 at 5:06
  • $\begingroup$ @VitaliyKaurov -- Thanks, got the link booked to read tomorrow. $\endgroup$
    – K7PEH
    Mar 5, 2020 at 2:49

2 Answers 2

2
$\begingroup$

Tickers with a caret don't always work. But I think your post from 2020 is moot now, FinancialData["^IXIC"] works just fine in 13.3 on Linux.

I find the Yahoo Finance data API quite reliable and fast, have a look at

now=Round@AbsoluteTime[Date[]]-AbsoluteTime[{1970,1,1,0,0,0}];
Import["https://query1.finance.yahoo.com/v7/finance/download/^IXIC?period1=1410825600&period2="<>ToString[now]<>"&interval=1d&events=history&includeAdjustedClose=true"]
$\endgroup$
0
$\begingroup$

As of version 13.1 this works:

(* get timeseries *)
nasdaq = FinancialData["^IXIC", "Close", {{2018, 1, 1}, {2022, 11, 03}}];

To get the daily closing prices you can do nasdaq["Values"]

You can also opreate directly on the TimeSeries

(*check most recent data*)
nasdaq["LastDate"] (* DateObject[{2022, 11, 2, 0, 0, 0}, "Instant", "Gregorian", 0.]*)
nasdaq["LastValue"] (* 10524.8 *)

(*annualised vol*)
16*StandardDeviation@Differences@Log@nasdaq (* 0.267453 *)

(*eye ball your data*)
DateListPlot[nasdaq]

Nasdaq

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.