Skip to content

Derivatives

Forward prices and values

Forward prices by cost of carry, the value of an existing forward, and forward exchange rates by covered interest parity.

Model id
derivatives.forwards, version 1
Domain
Derivatives
Evidence
standard
Cost class
instant: A closed-form calculation; a hosted run may take up to 2 seconds.

Formula

F=(S−I+U) e(r−q+u−y)TF = (S - I + U)\,e^{(r - q + u - y)T}flong=(F−K) e−rT,fshort=−flongf_{\mathrm{long}} = (F - K)\,e^{-rT}, \quad f_{\mathrm{short}} = -f_{\mathrm{long}}Ffx=S 1+rq d/Bq1+rb d/Bb,points=Ffx−SF_{\mathrm{fx}} = S\,\frac{1 + r_q\,d/B_q}{1 + r_b\,d/B_b}, \quad \text{points} = F_{\mathrm{fx}} - S

Where

FF
Forward price forward_price
SS
Spot price spot
II
Present value of the income the asset pays before delivery income_present_value
UU
Present value of the storage costs before delivery storage_cost_present_value
rr
Risk-free rate per year, continuously compounded risk_free_rate
qq
Income yield per year income_yield
uu
Storage cost per year, as a rate storage_cost_rate
yy
Convenience yield per year convenience_yield
TT
Time to delivery, in years years
flongf_{\mathrm{long}}
Value of a long forward position value
fshortf_{\mathrm{short}}
Value of a short forward position value
KK
Delivery price agreed in the contract delivery_price
FfxF_{\mathrm{fx}}
Forward exchange rate forward_rate
rqr_q
Money-market rate of the quote currency quote_rate
rbr_b
Money-market rate of the base currency base_rate
dd
Days to delivery days
BqB_q
Days in the year of the quote currency's day count: 360 or 365 quote_day_count
BbB_b
Days in the year of the base currency's day count: 360 or 365 base_day_count

Each symbol's field is named beside it; the inputs and outputs, with their units and bounds, are under Variables, and the citations give each formula's source.

Variables

Rates, returns and yields are decimals: 0.05 is five percent. Bounds in brackets include their end; in parentheses they exclude it.

Inputs

Forward price by cost of carry (cost_of_carry): 9 inputs
Inputs of the calculation cost_of_carry
NameDescription
Spotspotmoney · (0, 1e+09]Price of the asset for delivery now
Yearsyearsyears · [0, 50]Time to delivery, in years
Risk free raterisk_free_raterate · [-0.1, 1]Risk-free rate per year, continuously compounded
Income yieldincome_yieldrate · [-0.1, 1]Income (dividend) yield per year, continuously compounded
Storage cost ratestorage_cost_raterate · [0, 1]Storage costs per year as a yield on the price, continuously
Convenience yieldconvenience_yieldrate · [0, 1]Convenience yield per year of holding the asset, continuously
Income present valueincome_present_valuemoney · [0, 1e+09]Present value of known income paid before delivery
Storage cost present valuestorage_cost_present_valuemoney · [0, 1e+09]Present value of known storage costs paid before delivery
CalculationcalculationtextForward price by cost of carry
Value of an existing forward contract (forward_value): 11 inputs
Inputs of the calculation forward_value
NameDescription
Spotspotmoney · (0, 1e+09]Price of the asset for delivery now
Yearsyearsyears · [0, 50]Time to delivery, in years
Risk free raterisk_free_raterate · [-0.1, 1]Risk-free rate per year, continuously compounded
Income yieldincome_yieldrate · [-0.1, 1]Income (dividend) yield per year, continuously compounded
Storage cost ratestorage_cost_raterate · [0, 1]Storage costs per year as a yield on the price, continuously
Convenience yieldconvenience_yieldrate · [0, 1]Convenience yield per year of holding the asset, continuously
Income present valueincome_present_valuemoney · [0, 1e+09]Present value of known income paid before delivery
Storage cost present valuestorage_cost_present_valuemoney · [0, 1e+09]Present value of known storage costs paid before delivery
CalculationcalculationtextValue of an existing forward contract
Delivery pricedelivery_pricemoney · [0, 1e+09]Delivery price agreed in the contract
PositionpositiontextThe side valued: long (buyer) or short (seller)
Forward exchange rate by covered interest parity (fx_forward): 7 inputs
Inputs of the calculation fx_forward
NameDescription
CalculationcalculationtextForward exchange rate by covered interest parity
Spotspotratio · [1e-06, 1e+06]Spot exchange rate, in units of the quote currency per unit of the base currency
Daysdaysdays · [1, 3653]Actual days from spot to delivery
Quote ratequote_raterate · [-0.05, 1]Money-market rate of the quote currency per year, simple
Base ratebase_raterate · [-0.05, 1]Money-market rate of the base currency per year, simple
Quote day countquote_day_counttextDay count of the quote currency's rate
Base day countbase_day_counttextDay count of the base currency's rate

Outputs

Forward price by cost of carry (cost_of_carry): 2 outputs
Outputs of the calculation cost_of_carry
NameDescription
CalculationcalculationtextForward price by cost of carry
Forward priceforward_pricemoney · [0, 1e+15]Forward price for delivery at T
Value of an existing forward contract (forward_value): 3 outputs
Outputs of the calculation forward_value
NameDescription
CalculationcalculationtextValue of an existing forward contract
Forward priceforward_pricemoney · [0, 1e+15]Forward price for delivery at T
Valuevaluemoney · [-1e+15, 1e+15]Value of the contract to the side given: +/-(F - K) e^-rT
Forward exchange rate by covered interest parity (fx_forward): 4 outputs
Outputs of the calculation fx_forward
NameDescription
CalculationcalculationtextForward exchange rate by covered interest parity
Forward rateforward_rateratio · (0, 1e+08]Outright forward rate, in units of the quote currency per unit of the base currency
Forward pointsforward_pointsratio · [-1e+08, 1e+08]Forward less spot, in units of the quote currency; quoted points scale this by the pair's pip size
Forward premiumforward_premiumreturn · [-1, 100]Forward over spot, less one: the base currency's premium

Calculator

Run the model on your own inputs, starting from its example. Rates are decimals: 0.05 is five percent. The run goes to the pyeconomics API on this site: your values travel only in the request, and nothing is stored.

Loading the calculator…

Worked example

Example stock_with_known_dividends. Inputs:

{
  "calculation": "cost_of_carry",
  "convenience_yield": 0,
  "income_present_value": 2.162,
  "income_yield": 0,
  "risk_free_rate": 0.08,
  "spot": 50,
  "storage_cost_present_value": 0,
  "storage_cost_rate": 0,
  "years": 0.8333
}

Outputs:

{
  "calculation": "cost_of_carry",
  "forward_price": 51.135772578494745
}

Assumptions

  • Markets are frictionless and free of arbitrage, and money can be borrowed and lent at the risk-free rate.
  • Carry rates and the risk-free rate are continuously compounded and constant to delivery; known income and storage costs enter as their present values.
  • A currency forward uses money-market (simple) interest on each currency's day count over the actual days to delivery.

Limitations

  • Results are the formulas' outputs for the inputs given, not a quote for a traded contract or trading advice.
  • For a consumption commodity the formula is an upper bound unless the convenience yield is known; the model takes it as given.
  • Covered parity ignores the cross-currency basis, bid-offer spreads and credit, which open gaps between quoted and parity forwards.
  • Income worth more than the spot price plus storage, and a forward price or value outside [-1e15, 1e15], raise DomainError.

Evidence

Status: standard. Textbook consensus, such as bond duration or the CAPM formula.

Every model declares one status: standard (textbook consensus), practitioner (a widely used convention), contested (under active debate), rejected (failed out of sample) or historical (a superseded methodology).

Syllabus

The 2027 CFA® Program's topic areas this model relates to, as factual tags. Each links to CFA Institute's page for its level; pyeconomics holds none of the curriculum's text.

Citations

  1. Hull, J. C. (2018). Options, Futures, and Other Derivatives, 10th ed. Pearson. https://openlibrary.org/isbn/9780134472089 (Chapter 5 (forward prices with known income, a known yield, storage costs and convenience yields; the value of a forward contract; currency forwards)). ISBN 9780134472089
  2. Borio, C., McCauley, R. N., McGuire, P. and Sushko, V. (2016). Covered interest parity lost: understanding the cross-currency basis. BIS Quarterly Review, September 2016. https://www.bis.org/publ/qtrpdf/r_qt1609e.htm (Section "A framework" and Box A (the covered parity condition))

Changelog

  • Version 1: First version.

Use it elsewhere

Documentation
The model's reference page
REST API
GET or POST /v1/models/derivatives.forwards/run
MCP tool
run_model with the model's id, derivatives.forwards. Connect an assistant
Command line
pyeconomics models run derivatives.forwards --help

The worked example, from Python and from the command line:

Python
import pyeconomics

inputs = {
    "calculation": "cost_of_carry",
    "convenience_yield": 0,
    "income_present_value": 2.162,
    "income_yield": 0,
    "risk_free_rate": 0.08,
    "spot": 50,
    "storage_cost_present_value": 0,
    "storage_cost_rate": 0,
    "years": 0.8333,
}
result = pyeconomics.run("derivatives.forwards", inputs)
print(result.to_json())
Command line
pyeconomics models run derivatives.forwards --inputs - <<'JSON'
{
  "calculation": "cost_of_carry",
  "convenience_yield": 0,
  "income_present_value": 2.162,
  "income_yield": 0,
  "risk_free_rate": 0.08,
  "spot": 50,
  "storage_cost_present_value": 0,
  "storage_cost_rate": 0,
  "years": 0.8333
}
JSON