Python में Portfolio Analysis परिचय
Charlotte Werger
Data Scientist
Annual Return: एक कैलेंडर वर्ष में कमाया गया कुल रिटर्न
Annualized return: किसी भी अवधि से निकाला गया वार्षिक rate of return
Average Return: लंबी अवधि का कुल रिटर्न, जिसे (छोटी) अवधियों में समान बाँटा गया हो.
Cumulative (compounding) return: ऐसा रिटर्न जिसमें ब्याज, डिविडेंड और कैपिटल गेन को दोबारा निवेश करने के चक्रवृद्धि प्रभाव शामिल हों.
$$

$$
$$
N वर्षों में: $rate= (1 +Return)^{1/N} -1$
N महीनों में: $rate= (1+Return)^{12/N} -1$
किसी भी अवधि को वार्षिक दर में बदलें:
# timeseries की शुरुआत और अंत जाँचें
apple_price.head(1)
date
2015-01-06 105.05
Name: AAPL, dtype: float64
apple_price.tail(1)
date
2018-03-29 99.75
Name: AAPL, dtype: float64
# महीनों की संख्या असाइन करें
months = 38
# कुल रिटर्न की गणना करें
total_return = (apple_price[-1] - apple_price[0]) /
apple_price[0]
print (total_return)
0.5397420653068692
# महीनों पर वार्षिकीकृत रिटर्न निकालें
annualized_return=((1 + total_return)**(12/months))-1
print (annualized_return)
0.14602501482708763
# तीन वर्ष की अवधि चुनें
apple_price = apple_price.loc['2015-01-01':'2017-12-31']
apple_price.tail(3)
date
2017-12-27 170.60
2017-12-28 171.08
2017-12-29 169.23
Name: AAPL, dtype: float64
# 3 वर्षों पर वार्षिकीकृत रिटर्न निकालें
annualized_return = ((1 + total_return)**(1/3))-1
print (annualized_return)
0.1567672968419047
Python में Portfolio Analysis परिचय