next up previous contents index
Next: Options on futures Up: Futures algoritms. Previous: Futures algoritms.   Contents   Index

Pricing of futures contract.


\begin{displaymath}f_t = e^{r(T-t)} S \end{displaymath}



// file futurpri.cc
// author: Bernt A Oedegaard.

#include <cmath>

double futures_price(double S,                     // value of underlying
		     double r,                     // risk free interest
		     double time_to_maturity) {
    return exp(r*time_to_maturity)*S;
};



next up previous contents index
Next: Options on futures Up: Futures algoritms. Previous: Futures algoritms.   Contents   Index
Bernt Arne Odegaard
1999-09-09