Once upon a time, I worked in finance, as an arbitrage trader. The sort of arbitrage I was doing was called cash'n'carry. In this notebook, I'll try to explain how this basically works.
Cash and carry works by using the compounded effect of 3 financial instruments:
How does this strategy work? Well, it's simple: you borrow money which gives you cash that you reinvest in stocks which variation you cover by selling a future. This hedges you from most variations but allows you to make money from the differential interest rate between your money market and your future.
In the following, we analyze the hedge strategy by taking a look at each instrument, in turn.
How do you price a future ? Easy, there's a simple formula using continuous compounding (for simplicity's sake, we exclude dividends):
$$ F(t, T) = S(t) e ^{r (T - t)} $$We can visualize this formula with a simple interactive graph for a half-year ahead future contract (hence the $0.5$ factor):
%matplotlib inline
from pylab import *
from IPython.html.widgets import interact, fixed
def future_price(t, T, r, S):
return S * exp(r*(T - t))
interact(lambda t, T, r, S: print(future_price(t, T, r, S)),
t = (0, 0.5, 0.01),
T = fixed(0.5),
r = (0, 0.1, 0.001),
S = (10000, 20000, 500))
15333.0434331
We can also sketch the evolution of a price of a future over time, assuming the $S(t)$ function doesn't vary:
def future_over_time(r):
t = linspace(0, 0.5)
plot(t, future_price(t, 0.5, r, 15000))
xlabel('time (years)')
ylabel('value of future')
interact(future_over_time,
r = (0, 0.2, 0.001))
The evolution over time seems linear for the parameter choices that I have used here.