Skip to content

Instantly share code, notes, and snippets.

@QuantTraderEd
Created May 3, 2015 09:04
Show Gist options
  • Select an option

  • Save QuantTraderEd/ef12eebc91a2b66562c7 to your computer and use it in GitHub Desktop.

Select an option

Save QuantTraderEd/ef12eebc91a2b66562c7 to your computer and use it in GitHub Desktop.
calcuate futures&options implied interest rate
from sympy import *
c, p, K, F, T1, T2, r = symbols('c, p, K, F, T1, T2, r')
eq = c - p - F / (1 + r * T2) + K / (1 + r * T1)
ans = solve(eq,r)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment