Custom sizing for rolling futures
This page shows new SigTech users how to interpret and verify:
Futures Rolling Strategy Building Block history output
Strategy size
Mark-to-market P&L calculation
Overview
Initial cash sizing Strategy
Strategy output reconciliation
Fixed number of Future Contracts Strategy
Generate the performance reports
Environment
Learn more: Environment setup
Initial cash sizing
Learn more: Rolling Future Strategy
In this example the strategy will buy initially as many future contracts as possible as set by the initial_cash
. We will start with a simple example to buy 100 contracts of Crude Oil Futures.
Note: if no initial_cash
is set the strategy assumes that 1000 currency units are available.
We want to purely look at the mark-to-market P&L isolating trading costs and cash interest accrual.
The history
method returns the Mark-to-Market (MtM) P&L. This can easily be reconciled using price_series()
method and calculating the MtM as:
where:
is the notional of the future contract
is the number of contracts held
is the price difference from t to t+1
To verify your position and size, use Strategy.plot.portfolio_table
.
Note: as we are using previous day price to calculate initial_cash
there could be some differences from our calculation and final allocation as the usage is relative to the execution day price. The output below shows 100.785% exposure of our AUM equivalent to 100 contracts.
Since the size is relative to the cash available and the futures price, in the next roll our 100 contracts initial exposure could vary up or down. This is illustrated in the output below. From the available cash the strategy rolls from 100 to 101 trade units, or contracts:
Fixed number of contracts sizing
The default sizing explained above can be overwritten so that a fixed number of contracts is always traded independent of the initial_cash
amount.
The argument fixed_contracts
in the RollingFuturesStrategy allows to modify the roll behaviour without affecting any other property.
Comparing the two strategies we can quantify the impact of sizing in our strategies.
Ensuring the strategy is rolling 100 contracts:
Summary
RollingFuturesStrategies
can be sized by AUM or a fixed number of contracts.The initial sizing is calculated as .
Verifying the MtM is possible and easy.
Strategy.plot.portfolio_table
can return the portfolio using AUM or contracts as the unit type.
Next steps
Learn more: Futures modelling
Last updated