PureBytes Links
Trading Reference Links
|
I would like to create a Fair Value indicator for use in Trade Station
using the following formula and need some help with a line(s) of code that
calculates the number of days remaining until expiration. It would be
handy to have this done as automatically as possible so the user would only
have to change the inputs when the dividends changed or the futures
contract changed to the next expiration. Suggestions welcome.
Data1 would be the SPX or cash in the formula,
Data2 would be the IRX 91 day T-Bill Yield Index or r in the formula,or
other suggestion.
Dividends would be a user input, available from Barron's.
x is the number of days remaining until expiration of the futures
contract(is there a novel way of determing this with easy language code?)
The following formula is used to calculate fair value for stock index futures:
= cash [1+r (x/365)] - Dividends
Thanks,
BobR
|