
Python for Finance

Before discussing the basic concepts and formulas related to futures, let's review the concept of continuously compounded interest rates. In Chapter 3, Time Value of Money, we learned that the following formula could be applied to estimate the future value of a given present value:
Here, FV is the future value, PV is the present value, R is the effective period rate and n is the number of periods. For example, assume that the Annual Percentage Rate (APR) is 8%, compounded semiannually. If we deposit $100 today, what is its future value in two years? The following code shows the result:
import scipy as ps pv=100 APR=0.08 rate=APR/2.0 n=2 nper=n*2 fv=ps.fv(rate,nper,0,pv) print(fv)
The output is shown here:
-116.985856
The future value is $116.99. In the preceding program, the effective semiannual rate is 4% since the APR is 8% compounded semiannually. In options theory, risk-free rates and dividend yields are defined as continuously compounded. It is easy to derive the...
Change the font size
Change margin width
Change background colour