Ovviare al contango/backwardation

nico87

Forumer storico
Salve, spero qualcuno possa aiutarmi.
Testando un trading system basato sui prezzi spot di un indice future come è possibile ovviare al mutamento, spesso vistoso, dei prezzi spot in fase di rollover? Come disporre di una serie storica più pertinente ai prezzi delle singole scadenze future in maniera tale da non incorrere in perdite o guadagni fittizi?

Grazie
 
Salve, spero qualcuno possa aiutarmi.
Testando un trading system basato sui prezzi spot di un indice future come è possibile ovviare al mutamento, spesso vistoso, dei prezzi spot in fase di rollover? Come disporre di una serie storica più pertinente ai prezzi delle singole scadenze future in maniera tale da non incorrere in perdite o guadagni fittizi?

Grazie
Usare la serie storica dei futures?
 
Per serie storica dei future intendi il continuo delle scadenze?
Beh, sarebbe meglio avere i rendimenti dell'ipotetico B&H del front (dove decidi te quando effettuare il roll, i.e. 1,2,3,4...n giorni prima) e poi i prezzi effettivi per ricostruirti la curva.

Il continuo, se costruito per replicare lo spot (come molto spesso accade), e' sostanzialmente inutile.
 
Beh, sarebbe meglio avere i rendimenti dell'ipotetico B&H del front (dove decidi te quando effettuare il roll, i.e. 1,2,3,4...n giorni prima) e poi i prezzi effettivi per ricostruirti la curva.

Il continuo, se costruito per replicare lo spot (come molto spesso accade), e' sostanzialmente inutile.

Scusa non capisco se ci siamo capiti.
A me non interessa creare la curva di contango o backwardation ma avere una serie storica continua che non sia soggetta agli sbalzi dell effetto cont. o back. in maniera tale da poterci piazzare il ts senza incorrere in guadagni-perdite fittizie. Quindi a cosa mi servono i rendimenti?
Penso che non hai capito qual'è il mio scopo.
 
se puo' essere utile (R.Pardo):

mindful and consider whether the roll will have any impact on his strategy.
If he determines this to be the case, one simple way to deal with this is to
add in the estimated cost of the roll as additional slippage.
In the majority of cases, however, the roll is not much of a factor one
way or another on the performance of most trading strategies.
In summary, actual futures price contracts are unsuitable for long-term
testing for two reasons: They are too short and their volume and volatility
are not representative of that which is typically traded. Also, the expiration
of futures contracts requires the long-term strategy to perform rollover
trades to keep long-term positions intact.
A number of data solutions have been offered to solve the problems
that futures contracts present to the testing of strategies. The majority of
these solutions involve merging a patchwork of prices from the first expirations
into some form of continuous contract for the purposes of testing.
We will consider these various methods in the next sections.
THE CONTINUOUS CONTRACT
One solution to this problem is the continuous contract. This contract is a
sequential patchwork of successive individual futures contracts. For example,
in January of 2006, the continuous S&P contract had price data
from the March 2006 contract. In April of 2006, it had price data from
the June 2006 S&P contract. The continuous contract concatenates price
data from the most active front contract price expiration into a single price
history file.
The continuous contract solves two of the three major problems. It can
be as long as required. It has the front expiration contract prices and accurately
reflects the natural trading vehicle of most speculative traders. It
has one problem, however: The rollover price gap between the last close of
the expiring contract and the opening price of the new contract sometimes
appears as a large opening gap. This can result in a windfall profit or loss
in the simulation, when, in fact, that situation never existed in real trading.
If the strategist chooses to use the continuous contract for testing, this roll
gap must be taken into consideration.
THE PERPETUAL CONTRACT
Another popular solution is the perpetual contract. This contract is very
different from the continuous contract. It consists of a mathematical transformation
of price data which are, consequently, not real price data. Price

data in a perpetual contract are actually created with an interpolation formula
that attempts to create the three-month forward values of the commodity
in a manner similar to the London Metals Exchange forward pricing.
The design of the extrapolation formula is intended to create a price
history that is close to the targeted three-month contract.
The perpetual contract solves two of the three major problems: It can
be as long as necessary and it eliminates the rollover price gaps. Whereas
its price and volatility structure is similar to that of the front contract price
data, it is not exactly like the actual prices of the front contract that it
attempts to model. This difference will introduce subtle discrepancies between
simulated performance and real-time trading performance.
The perpetual contract introduces three unique problems. First, it
does not contain real price history. Every price is transformed. Second,
it introduces a new distortion of its own and it tends to somewhat artificially
dampen actual price volatility by behaving differently from the
actual price data themselves. Third, entry orders for real-time trading derived
from it must be transformed. If used to create daily trading signals,
these signal prices will need to be adjusted so as to be usable in real-time
trading.
This added price distortion may be of little consequence, with a very
slow system that trades for the big moves. This distortion, however, may
prove to be a serious problem with a very active trading system that targets
small moves and is highly sensitive to short-term changes in volatility.
ADJUSTED CONTINUOUS CONTRACTS
The adjusted continuous contract combines the best of all of the preceding
alternatives. It merges front expiration price data into a continuous price
history. It mathematically removes all of the price roll gaps, however. It can
be done in two ways. Contracts can be adjusted, keeping the most recent
data unchanged and adjusting all preceding data up or down an amount
equal to the roll gaps. This is a back-adjusted continuous contract (see
Figure 6.4).
A front-adjusted continuous contract adjusts from the beginning of the
file to the end. This leaves the most distant data in their natural form and
the most current data are adjusted.
The neutral data transform preserves the relative differences between
prices. It introduces a distortion with any calculations that use percentages
of price. It cannot be used with charting applications that use absolute
prices for support and resistance. Back-adjusted contracts can also have
negative prices because of the gap adjustments.

A back-adjusted continuous contract solves all three of the major problems
for most systems: It can be as long as necessary, it faithfully represents
the data to be traded, and it eliminates the rollover gap. If the price
data extend far back in time, prices can become unusually large or even
negative, which will introduce a distortion in calculations using a percentage
of price. Back-adjusted continuous contracts, therefore, are not without
problems testing some types of trading strategies
 
se puo' essere utile (R.Pardo):

mindful and consider whether the roll will have any impact on his strategy.
If he determines this to be the case, one simple way to deal with this is to
add in the estimated cost of the roll as additional slippage.
In the majority of cases, however, the roll is not much of a factor one
way or another on the performance of most trading strategies.
In summary, actual futures price contracts are unsuitable for long-term
testing for two reasons: They are too short and their volume and volatility
are not representative of that which is typically traded. Also, the expiration
of futures contracts requires the long-term strategy to perform rollover
trades to keep long-term positions intact.
A number of data solutions have been offered to solve the problems
that futures contracts present to the testing of strategies. The majority of
these solutions involve merging a patchwork of prices from the first expirations
into some form of continuous contract for the purposes of testing.
We will consider these various methods in the next sections.
THE CONTINUOUS CONTRACT
One solution to this problem is the continuous contract. This contract is a
sequential patchwork of successive individual futures contracts. For example,
in January of 2006, the continuous S&P contract had price data
from the March 2006 contract. In April of 2006, it had price data from
the June 2006 S&P contract. The continuous contract concatenates price
data from the most active front contract price expiration into a single price
history file.
The continuous contract solves two of the three major problems. It can
be as long as required. It has the front expiration contract prices and accurately
reflects the natural trading vehicle of most speculative traders. It
has one problem, however: The rollover price gap between the last close of
the expiring contract and the opening price of the new contract sometimes
appears as a large opening gap. This can result in a windfall profit or loss
in the simulation, when, in fact, that situation never existed in real trading.
If the strategist chooses to use the continuous contract for testing, this roll
gap must be taken into consideration.
THE PERPETUAL CONTRACT
Another popular solution is the perpetual contract. This contract is very
different from the continuous contract. It consists of a mathematical transformation
of price data which are, consequently, not real price data. Price

data in a perpetual contract are actually created with an interpolation formula
that attempts to create the three-month forward values of the commodity
in a manner similar to the London Metals Exchange forward pricing.
The design of the extrapolation formula is intended to create a price
history that is close to the targeted three-month contract.
The perpetual contract solves two of the three major problems: It can
be as long as necessary and it eliminates the rollover price gaps. Whereas
its price and volatility structure is similar to that of the front contract price
data, it is not exactly like the actual prices of the front contract that it
attempts to model. This difference will introduce subtle discrepancies between
simulated performance and real-time trading performance.
The perpetual contract introduces three unique problems. First, it
does not contain real price history. Every price is transformed. Second,
it introduces a new distortion of its own and it tends to somewhat artificially
dampen actual price volatility by behaving differently from the
actual price data themselves. Third, entry orders for real-time trading derived
from it must be transformed. If used to create daily trading signals,
these signal prices will need to be adjusted so as to be usable in real-time
trading.
This added price distortion may be of little consequence, with a very
slow system that trades for the big moves. This distortion, however, may
prove to be a serious problem with a very active trading system that targets
small moves and is highly sensitive to short-term changes in volatility.
ADJUSTED CONTINUOUS CONTRACTS
The adjusted continuous contract combines the best of all of the preceding
alternatives. It merges front expiration price data into a continuous price
history. It mathematically removes all of the price roll gaps, however. It can
be done in two ways. Contracts can be adjusted, keeping the most recent
data unchanged and adjusting all preceding data up or down an amount
equal to the roll gaps. This is a back-adjusted continuous contract (see
Figure 6.4).
A front-adjusted continuous contract adjusts from the beginning of the
file to the end. This leaves the most distant data in their natural form and
the most current data are adjusted.
The neutral data transform preserves the relative differences between
prices. It introduces a distortion with any calculations that use percentages
of price. It cannot be used with charting applications that use absolute
prices for support and resistance. Back-adjusted contracts can also have
negative prices because of the gap adjustments.

A back-adjusted continuous contract solves all three of the major problems
for most systems: It can be as long as necessary, it faithfully represents
the data to be traded, and it eliminates the rollover gap. If the price
data extend far back in time, prices can become unusually large or even
negative, which will introduce a distortion in calculations using a percentage
of price. Back-adjusted continuous contracts, therefore, are not without
problems testing some types of trading strategies

Il traduttore di google..... :wall:
 
Il traduttore di google..... :wall:

è un modo per imparare l'inglese... :lol:

Il modo normale di procedere, ancora una volta nonno Regolo Docet, è di acquisire il segnale dai dati dell'indice, e di simulare ingresso e uscita sul relativo future.
Ma anche l'indice risente dello stacco dividendi che avviene in gg. diversi.
Ed i dividendi di un paio di anni fa pesavano % piu' di oggi.
La questione non è mai stata risolta ed ognuno agisce come crede.
ciao
 
Scusa non capisco se ci siamo capiti.
A me non interessa creare la curva di contango o backwardation ma avere una serie storica continua che non sia soggetta agli sbalzi dell effetto cont. o back. in maniera tale da poterci piazzare il ts senza incorrere in guadagni-perdite fittizie. Quindi a cosa mi servono i rendimenti?
Penso che non hai capito qual'è il mio scopo.
Si ma quando vai a mettere i soldi reali sui futures gli "sbalzi dell'effetto cont. o back." (in realtà sarebbe più corretto parlare degli effetti dovuti al contango o backwardation) ci sono (e non possono essere nemmeno ignorati nell'intraday), quindi perchè eliminarli nel backtest?

Esempio con il Natural Gas... In blu il continuo di Bloomberg (senza salti!), in rosso ciò che si sarebbe portato a casa un'investitore che avesse aperto la posizione all'inizio del periodo e poi, in questo caso, rollato la posizione sul front month 3 giorni prima della scadenza (unità di misura di partenza è $/MMBtu)... Secondo te lo puoi ignorare l'effetto del roll nel tuo backtest e poi pensare che il risultato andando a mercato sia lo stesso?
 

Allegati

  • NG1.jpg
    NG1.jpg
    77,6 KB · Visite: 498
Ultima modifica:
Al momento ho seguito questo metodo il risultato pare efficace.

certi casi i dati di mercato non possono essere utilizzati in forma grezza ma devono essere "aggiustati". Questo avviene per tutti i dati relativi ai contratti futures e per i dati relativi alle azioni principalmente in caso di stacco dei dividendi, "stock splitting" o aumenti di capitale.
Per quello che riguarda i futures, il problema nasce dal fatto che ogni contratto future è quotato per un periodo di tempo molto limitato: normalmente non piú di tre mesi.
Per esempio il future del BTP prevede consegna a Marzo, Giugno, Settembre, Dicembre. Questo significa che da Genneaio ai primi di Marzo il contratto di gran lunga piú liquido è quello scadente a Marzo, mentre da Marzo a Giugno il contratto piú liquido è quello di Giugno e cosí via.
Agli inizi di Marzo ci troviamo perció in una situazione dove il contratto di Marzo quota un prezzo che è praticamente uguale a quello di un BTP con scadenza e struttura cedolare simili a quelle previste dal contratto stesso, mentre il contratto di Giugno quota circa come il prezzo a termine a 3 mesi dello stesso BTP.
La serie storica riporta tuttavia uno dietro l'altro i prezzi del future sulla sua scadenza piú liquida, per cui esiste una data in Marzo in cui si passerà dal contratto di Marzo al contratto di Giugno. La differenza puó essere alle volte rilevante, e ció che conta è che occorre impedire che il nostro sistema registri un profitto od una perdita fittizia dovute semplicemente al passaggio di contratto.
In pratica il metodo per costruire una serie di prezzi di contratti future
continua e testabile è il seguente:
• si comincia rilevando i prezzi del contratto piú vicino alla scadenza (detto "nearest future") che tipicamente è il piú liquido: se si è in febbraio e si parla del BTP si prenderà il contratto di Marzo;
• si continua cosí fino a che, ad un certo punto (presumibilmente ai primi di Marzo), il contratto di Marzo diviene meno liquido di quello di Giugno (questa informazione la si desume dai dati di Volume riportati dal mercato) definiamo questa data come data di "rollover";
• il giorno in cui questo accade si rileva la differenza tra i close del contratto di Giugno e quello di Marzo, la si registra e la si sottrae dai prezzi del contratto di Giugno continuando cosí fino a che il contratto di Settembre non diventa piú liquido di quello di Giugno;
• si misura a questo punto la differenza tra il contratto di Settembre e quello di Giugno, si somma tale differenza a quella già registrata, si sottrae il dato cosí ottenuto dalle rilevazioni di Settembre.
 

Users who are viewing this thread

Back
Alto