Provided with futures contract front price data from Bloomberg retrieved with pullit, construct term structure factor. The futures term structure factor (Szymanowska et al. 2014; Fuertes et al. 2015) is concerned with the shape (steepness) of the futures term structure and sorts on roll yield.
TS_factor( data, update_frequency = "month", return_frequency = "day", front = 1L, back = 2L, ranking_period = 1L, long_threshold = 0.5, short_threshold = 0.5, weighted = F ) # S4 method for FuturesTS TS_factor( data, update_frequency = "month", return_frequency = "day", front = 1L, back = 2L, ranking_period = 1L, long_threshold = 0.5, short_threshold = 0.5, weighted = F )
data | an S4 object of class |
---|---|
update_frequency | a scalar |
return_frequency | a scalar |
front | a scalar |
back | a scalar |
ranking_period | a scalar |
long_threshold | a scalar |
short_threshold | a scalar |
weighted | a scalar |
An S4 object of class AssetPricingFactor
.
Fuertes A, Miffre J, Fernandez-Perez A (2015).
“Commodity strategies based on momentum, term structure, and idiosyncratic volatility.”
Journal of Futures Markets, 35(3), 274--297.
ISSN 1096-9934, doi: 10.1002/fut.21656
, https://doi.org/10.1002/fut.21656.
Szymanowska M, De Roon F, Nijman T, Van Den Goorbergh R (2014).
“An anatomy of commodity futures risk premia.”
The Journal of Finance, 69(1), 453--482.
ISSN 1540-6261, doi: 10.1111/jofi.12096
, https://doi.org/10.1111/jofi.12096.