Python Forum
Annualised returns in python. Urgent request
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Annualised returns in python. Urgent request
#1
hi,
I have a data from 1930 of stock returns monthly. I have calculated annualized return for the whole date as annualized_ret. Now I want the annualized return from 2000- 2019. Can some body help with the code.

I am a beginner
Reply
#2
What have you tried and where are you stuck? We're not going to do the work for you.
Reply
#3
annualised_ret = (return_per_month+1)**12 - 1
annualised_ret

I tried this. annualized_ret[2000:2019].
but not working
I have also changed the index to date time.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  how can I correct the Bad Request error on my curl request tomtom 8 5,060 Oct-03-2021, 06:32 AM
Last Post: tomtom
  Python Request Errors PythonNoob1998 7 3,921 Jan-07-2021, 05:18 PM
Last Post: buran
  Need urgent help OneTwo 9 2,903 Nov-24-2020, 08:40 AM
Last Post: OneTwo
  Super Urgent, work related. Gimp Python tsurubaso 5 2,947 Oct-19-2020, 08:18 AM
Last Post: tsurubaso
  ImportError: cannot import name 'Request' from 'request' abhishek81py 1 3,926 Jun-18-2020, 08:07 AM
Last Post: buran
  Python function returns inconsistent results bluethundr 4 3,187 Dec-21-2019, 02:11 AM
Last Post: stullis
  Need help urgent fireablade 1 1,503 Oct-01-2019, 05:30 PM
Last Post: buran
  Python returns generator instead of None Tawnwen 4 4,673 Mar-09-2018, 07:06 AM
Last Post: DeaD_EyE
  Problems with using request in python 3 Maaniac 3 3,282 Feb-15-2018, 08:58 AM
Last Post: Maaniac
  'Hello, World!' Problem - Urgent OmarSinno 7 4,538 Sep-07-2017, 06:22 AM
Last Post: OmarSinno

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020