• C++ Programming for Financial Engineering
    Highly recommended by thousands of MFE students. Covers essential C++ topics with applications to financial engineering. Learn more Join!
    Python for Finance with Intro to Data Science
    Gain practical understanding of Python to read, understand, and write professional Python code for your first day on the job. Learn more Join!
    An Intuition-Based Options Primer for FE
    Ideal for entry level positions interviews and graduate studies, specializing in options trading arbitrage and options valuation models. Learn more Join!

Annualized Returns and Realized Volatility

Joined
10/3/22
Messages
1
Points
11
Apologies for the ignorant question. I figure a forum like this, with very smart people, would be the best place to ask this question:

Given daily prices (not including weekends/holidays/etc.) of a security over a length of time T (may be more/less than a year), how do you calculate the annualized return and realized volatility?

Concerning the annualized return, I guess one approach would be to calculate the continuously compounded rate given the initial and final prices, but then how do you annualize this?

Thanks for the help!
 
Last edited:
This was a dilemma I faced in a coding assessment.

1) Convert the dates in the first column in the time series data to the date time object.
2) You will be able to run a loop to get the number of business days in that year and create a list to store the number of days in each year, let's call it b_days
For example: b_days[j] = df["2018 + j"].shape(0)

3) Now using loops on the whole data frame, you filter out the return series for each year, where return is in the form (1 + r)
4) cumprod() this,
5) take the 1 / n power, where n = b_days[j]

(NOTE: We can approximate the calculation above by assuming a fixed number of business days in each year, but that's just wrong and too easy)

You'll get annualized return for each year.
Now you do the same thing for the number of years, let's say you have 10.5 year data, and using the above you calculated 11 annualized returns, last 1 for the last half year.
annualized return for the whole time series = [(1 + r1) + (1+ r2) + .... + (1 + r11)] ^ (1/10.5)
 
Last edited:
Back
Top