Giter Site home page Giter Site logo

Comments (9)

mdutta1234 avatar mdutta1234 commented on July 26, 2024 1

Hello, I checked out the performance of the other sectors and found the cagr was lesser in the case of the trading algorithm w.r.t the benchmark, although when I looked at the graph against the benchmark I found that CAGR of trading algo should be higher.So I wanted to crosscheck the CAGR calculation function .Please check the function below which I modified:

def calculate_cagr_b(portfolio):

final_portfolio = portfolio['total'].iloc[-1]
initial_portfolio = portfolio['total'].iloc[0]
delta = len(portfolio.index)
print('Number of trading days = ', delta)
YEAR_DAYS = 252*4
returns = (final_portfolio/initial_portfolio) ** (YEAR_DAYS/delta) - 1
return returns

I changed Year_days to 252*4 as I was checking for last 4 years , is this correct?

from hedging-of-financial-derivatives.

mdutta1234 avatar mdutta1234 commented on July 26, 2024 1

Ok thanks a lot.

from hedging-of-financial-derivatives.

mdutta1234 avatar mdutta1234 commented on July 26, 2024

How many years of historical data would you like me to use for the backtest?

from hedging-of-financial-derivatives.

mdutta1234 avatar mdutta1234 commented on July 26, 2024

When I kept the start date as 2018-12-02 and end date as 2022-12-01(yyyy-mm-dd format), the CAGR is very less compared to NIFTY Bank and the Portfolio Performance is lower than Benchmark for most part of the Portfolio Performance vs Benchmark graph.

from hedging-of-financial-derivatives.

Akshat111111 avatar Akshat111111 commented on July 26, 2024

Thanks for considering this repository for contribution,The duration should be last 3-4 years.

from hedging-of-financial-derivatives.

Akshat111111 avatar Akshat111111 commented on July 26, 2024

You can try considering different sectors,which can give better results as compared to bank nifty

from hedging-of-financial-derivatives.

mdutta1234 avatar mdutta1234 commented on July 26, 2024

Ok thank you, I will check the performance for other sectors

from hedging-of-financial-derivatives.

Akshat111111 avatar Akshat111111 commented on July 26, 2024

Yeah, you can proceed further.After implementing it raise a PR so that I can review it.Talking about the performance, we will raise an another issue for its optimization.

from hedging-of-financial-derivatives.

Akshat111111 avatar Akshat111111 commented on July 26, 2024

I am assigning this issue to you,so that you can add the PR

from hedging-of-financial-derivatives.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.