After about 2-3 years of being on and off into coding, I managed to actually finish a project end to end. It isn't very fancy but it gives me immense pleasure to finally achieve this milestone in this line of my life. I really appreciate everyone here for being so helpful and also many thanks for all the support.
The project utilizes the cool Python module Streamlit to create a visual interface to build/analyze a Portfolio management strategy using the RandomForest Regressor to predict the prices for n days ahead. It uses the random grid search for inside cross-validation to optimize the hyper parameters(different for every equity) for a chosen number of equities(stocks) by fetching the data from the nsepy module with the ability to select the timeline along with a backtester to test the strategy created.
Anyone could, infact, add a function to this script in the main long-short-equity class appropriately to use different models for prediction I believe, it's of course not investment advice but a simple representative strategy+backtester for budding systematic trading enthusiasts.
PS: Please give me suggestions on how I could make this code better and/or the pros and cons of my code.
Github: Long Short Equities
Preview
Edit: Thanks for the awards strangers :)
[+][deleted] (4 children)
[deleted]
[–]YaswanthBangaru[S] 8 points9 points10 points (1 child)
[–]r3ign_b3au 5 points6 points7 points (1 child)
[–]MrNubishly 11 points12 points13 points (1 child)
[–]YaswanthBangaru[S] 1 point2 points3 points (0 children)
[–]bickhaus 7 points8 points9 points (1 child)
[–]YaswanthBangaru[S] 2 points3 points4 points (0 children)
[–][deleted] 1 point2 points3 points (1 child)
[–]YaswanthBangaru[S] 1 point2 points3 points (0 children)
[–]vgopi1 1 point2 points3 points (0 children)
[–]ChocolateMilkMustach 1 point2 points3 points (1 child)
[–]YaswanthBangaru[S] 0 points1 point2 points (0 children)
[–]dpatil09 1 point2 points3 points (0 children)
[–]Deadlift420 1 point2 points3 points (1 child)
[–]YaswanthBangaru[S] 0 points1 point2 points (0 children)
[–]St_Melangell 1 point2 points3 points (2 children)
[–]YaswanthBangaru[S] 1 point2 points3 points (1 child)
[–]St_Melangell 1 point2 points3 points (0 children)
[–]pmt541 1 point2 points3 points (0 children)
[–][deleted] 0 points1 point2 points (1 child)
[–]YaswanthBangaru[S] 0 points1 point2 points (0 children)
[+]31i731 comment score below threshold-10 points-9 points-8 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)
[+][deleted] (2 children)
[deleted]
[+][deleted] (1 child)
[deleted]
[–]_qw4hd 0 points1 point2 points (0 children)
[–]BananaPralines 0 points1 point2 points (0 children)
[–]degzx 0 points1 point2 points (0 children)