Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
Large Cap portfolio max Sharp

Large Cap portfolio max Sharp

5 responses

You are borrowing a lot of money. I would try to manage your leverage. You have to pay an interest rate for every dollar that goes over 100% leverage.

1.0 Leverage means you have $500, and you have invested it all.
2.0 Leverage means you have $500, and are trading with $1000.
10.0 Leverage means you have $500 and you are trading with $5000.

It's a double edge sword you need to watch for. Because profit will increase if you throw more money at it.

Hi Eric,

That's a good point. Based on your suggestion, I will modify the code to control leverage. Thank you for your input.

Avi

modified algo of large cap stock

I would test on more stocks to really get a feel for your strategy. If these stocks performed well over the time of your backtest, it will have a look-ahead bias. I think this would be something better to test in pipeline. Pipeline is really easy to use and allows you to test over a range of stocks. How did you get your portfolio weights?

I haven't checked out pipline, plan to look into it. To get the weights using portfolio optimizting code by Elliot
in his blog https://elliotnoma.wordpress.com/2013/01/22/construct-a-stock-portfolio-using-r. I got tickers from Finviz screener.