TD Ameritrade API Questions

Yeah, the INTC historical volatility was closer to the mark I'd say.
How do you know? Can you give numbers?
My above 2 calculations are for AMD for DaysInYear=252 and 365.

In any event, I would not trust TDAmeritrade's API to pick my sock color in the morning not to mention provide important financial data off of which to trade,
Why? Have you used this API in the past?
Which API do you use now?

and there are an infinite number of ways to calculate historical volatility anyway, so if you want the "best answer" for you, you probably need to compute your own from a high-quality data source on the underlying. Or find a source you can trust that also provides real documentation of their method.
I know, but I want to avoid keeping also a local database of stock prices.
Normally the API should have all needed data, especially elementary data like such HV using industry-standard parameters.
TD has a "volatility" field for stock data, but it seems either buggy or uses a differrent algorithm.

As next I'll ask their support, though I had asked a similar question but which was regarding options volatility: there is a mysterious constant volatility=29 for all and each underlying, and the support said that it's an old experimental stuff or so, and that they will fix it or so after the transition to Schwab...
 
Last edited:
As next I'll ask their support, though I had asked a similar question but which was regarding options volatility: there is a mysterious constant volatility=29 for all and each underlying, and the support said that it's an old experimental stuff or so, and that they will fix it or so after the transition to Schwab...
To whom it may concern: here's the answer from the TDA API support:

My email to TDA API support:
Hello,
the API function GetQuote/GetQuotes(
https://developer.tdameritrade.com/quotes/apis/get/marketdata/quotes )
gives for equity tickers right now such "volatility" values:
AMD: "volatility": 0.0137,
INTC: "volatility": 0.0182,
How to interpret this?
And how can I convert this to annual volatility to get the historical volatility (HV) ?
Thx & Regards,
The answer of TDA API support:
Thank you for contacting TD Ameritrade API.
The volatility field in the API response is not an IV value. It is essentially a standard deviation of trade price fluctuations that was used in legacy TDA systems.
This value does not represent implied volatility.
We will look to update some of those calculations with a different source that does represent IV in a future Schwab version of our API.
Sincerely,
Trader API Support

Hmm. one does not expect IV with the underlying, but just the HV (ie. the realized volatility), as was also explicitly stated in the query...
And he does not tell the parameter(s) they used for the said "standard deviation of trade price fluctuations", since normally one would make such a calculation as a moving average using a certain period of time bars, IMO. Also missing the info whether it starts anew each trading day, or gets continued...
 
Last edited:
Getting the account data via API gives such a JSON:
...
"currentBalances" : {
"cashAvailableForTrading" : 123456.78,
"cashAvailableForWithdrawal" : 123000.00,
...

Question:
Is the following relation always true: cashAvailableForWithdrawal <= cashAvailableForTrading ?
Can cashAvailableForTrading ever be less than cashAvailableForWithdrawal ?
%%
Sure, with trades pending,+ dividends, more cashAvailable for withdrawal than trading [assume perfect timing] .
And perhaps even more rare, but has happened in JUNE, SCHW found a bit of $ in an old TD account, now SCHW.
Looks like you thought of the T + 2 exception.
JUN maybe TD=SCHW now , but dont know if that applies to all.
 
Back
Top