OPEN-SOURCE SCRIPT

Futures Forward Price [NeoButane]

155
In futures markets, the theoretical value of a futures contract can be derived from its underlying price and cost of carry. By baking in the costs and potential yields, the theoretical forward price then be used in basis against futures prices in place of the underlying spot price.

Usage
The script creates plots on the main chart and a separate window pane. Both are meant to be used to visualize dislocations in the market.

By using a futures vs. forward basis instead of futures vs. spot basis, discounts in the market are clearer.
cuplikan

Last month, the gold futures market GCZ2025 traded >1% above forward price when tariffs were announced and fell back in line once the tariffs were verbally retracted.
cuplikan

View roll spreads over a back-adjusted continuous chart. I guess. I don't think spread traders only look at one chart. This is as educational for me as it is you.
cuplikan

Configuration
The underlying reference needs to be changed to match the futures contract you are using.
The Risk-Free Rate defaults to FRED:SOFR. I found the contract month matched 3-Month SOFR Futures to be the closest for forward price.

  • Risk-Free Rate: The interest rate source for forward price.
  • Constant Risk-Free Rate: a static interest rate that can be used in advance of future changes in risk-free rate.
  • Underlying Reference: spot or index price. Some examples include TVC:SPX, TVC:GOLD, CRYPTO:BTCUSD, TVC:USOIL.
  • Forward Price Compounding: determines which formula to use. They're similar and become closer as the contract matures.
  • Alternative Contract: enable and select a futures contract to use it on a chart different than the main.
  • Storage Cost and Yield: for use with commodities. I haven't found a proper use for them yet but enabling is simple if you are able to.



The following are meant to be used with the continuous formula as they are compounded. However the rate sources don't differ much for the purpose of futures prices.
3-Month CME SOFR Futures
3-Month ICEEUR SONIA Futures
3-Month Osaka TONA Futures

The other rate sources are either meant for futures contracts shorter than quarterly such as monthly crypto futures or were meant to help myself understand how different rates would align with futures prices, like inflation.


What this script does
It uses the cost of carry formula to output the forward price (red line). The underlying reference (green line) is plotted alongside and a futures-derived reference (blue line) can be displayed to see how it looks next to the real reference price.

The data pane displays either the nominal difference or percentage difference between the real futures price and the calculated forward price.


Further reading
investopedia.com/terms/f/forwardprice.asp
cmegroup.com/education/files/understanding-stock-index-futures.pdf

oxfordenergy.org/wpcms/wp-content/uploads/2021/08/Is-the-Oil-Price-Inflation-Relationship-Transitory.pdf
www-2.rotman.utoronto.ca/~hull/TechnicalNotes/TechnicalNote24.pdf
cmegroup.com/education/articles-and-reports/trading-comex-gold-and-silver.html

3-month rate futures
cmegroup.com/education/files/sofr-futures-contract-specifications.pdf
ice.com/interest-rates/short-term-interest-rate-futures/sonia-futures
bankofengland.co.uk/markets/transition-to-sterling-risk-free-rates-from-libor
jpx.co.jp/english/derivatives/products/interest-rate/3m-tona-futures/index.html

Pernyataan Penyangkalan

Informasi dan publikasi tidak dimaksudkan untuk menjadi, dan bukan merupakan saran keuangan, investasi, perdagangan, atau rekomendasi lainnya yang diberikan atau didukung oleh TradingView. Baca selengkapnya di Persyaratan Penggunaan.