Description Usage Arguments Value Note Author(s) References
The function creates a CSI perpetual futures contract specification which is passed onto the
futureseries
function for data extraction.
1 2 | perpetualspec(MonthsAheadToViewMarket = 1, OIWeighted = 1, DayOfMonthToRoll = 1,
MonthsPriorToRoll = 0, valid.months = "VVVVVVVVVVVV")
|
MonthsAheadToViewMarket |
Determines which contracts are to be combined to form the contract. |
OIWeighted |
Determines whether the open interest, rather than the number of days from rolling, is used as the weight factor. |
DayOfMonthToRoll |
The day of the month to roll (31 for expiration). |
MonthsPriorToRoll |
The number of months before the contract month to roll (0 for expiration month). |
valid.months |
This is a string of 12 characters. Each of those characters is either an “I” for inactive, “V” for active (valid), or “S” for switching (currently low volume.) During retrieval, the condition is “V” to retrieve and not “V” to ignore. If the active months have changed historically, it is up to the users to convert “S” to “V” to build representative contracts. Of course 12 “Vs” (“VVVVVVVVVVVV”) retrieves every contract ever traded (see note). |
Returns an object of class uaSpec
The user may find it useful to first call the marketprofile
which returns the active months.
Alexios Ghalanos
Commodity Systems Incorporated, UNFAIR ADVANTAGE API (API2) FUNCTIONAL SPECIFICATION, 2006.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.