This function aggregates a set of futures contract data by stitching contract data over an observation period, resulting in a
set of futures observations that is 'complete' (ie. Does not feature missing observations). Aggregated futures
data benefit from several computational efficiencies compared to raw contract data, but results in the loss of futures price information.
There are two methods of the Stitch.Contracts
function that can be utilized the stitch contracts:
Method 1
Stitch.Contracts(Futures, Contract.Numbers, verbose = T)
Futures data may be aggregated by stitching prices according to maturity matching. This method requires the inputs TTM
, maturity.matrix
and rollover.frequency
.
This method stitched contracts by matching the observation prices according to which contract has the closest time-to-maturity of the desired maturity specified
in TTM
. Contracts are rolled over at the frequency specified in rollover.frequency
.
Method 2
Stitch.Contracts(Futures, TTM, maturity.matrix, rollover.frequency, verbose = T)
Futures data may be stitched according to the contract numbers offset from the closest-to-maturity contract. This method requires only the
input Contract.Numbers
specifying which contracts should be included. This method is most appropriate when the maturity of available
contracts are consistent (ie. contracts expire every month or three months).