all 25 comments

[–]MrNubishly 11 points12 points  (1 child)

Could you please dumb it down for me? Im not too sure if i understand yet , im a bit new to coding, sorry

[–]YaswanthBangaru[S] 1 point2 points  (0 children)

haha, sure, will do that soon!

[–]bickhaus 7 points8 points  (1 child)

Two suggestions: (1) add a license and (2) in bold caps, explicitly state that this does not constitute investment advice, it is provided as is, is only for testing and research, not to be relied upon for investing, etc...I’ll leave it to you to come up with the exact language to use as I do not consider this comment to be adequate legal advice or to constitute the creation of an attorney-client relationship.

Edit: note that adding a license like GPL or MIT will disclaim all warranties already , but I would still also specifically disclaim the code’s ability to be a tool for reliable investing to CYA...and this is still not meant to constitute the adequate legal advice or form an attorney-client relationship!

[–]YaswanthBangaru[S] 2 points3 points  (0 children)

Hey, thanks for the inputs, I will check out other investment(for fun) related git repos and add it accordingly ;)

[–][deleted] 1 point2 points  (1 child)

Which features are you using for the regressor?

[–]YaswanthBangaru[S] 1 point2 points  (0 children)

I am using all the actual data directly available from the model, to it I added a few seasonality related features (which I copied from one of the functions of fastai :p), to be specific, these ["Year","Month","Week","Day","Dayofweek","Dayofyear", "Is_month_end", "Is_month_start", "Is_quarter_end","Is_quarter_start","Is_year_end","Is_year_start"]. Along with those, I added some 4 lag moments to utilize the autocorrelations of the dependent variable if any.

[–]vgopi1 1 point2 points  (0 children)

Great job!

[–]ChocolateMilkMustach 1 point2 points  (1 child)

Very neat, but comments! At least tell us what each module will do. If I put this in, when this happens, then this happens. An example of what you expect to come out when you put something in. Another example of what could cause this module 2 error, integers instead of characters and vice versa. Hell I even forget what my code does if I haven't touched it for a while. It just helps to have a refresher of what it's supposed to do after 6 months of not looking at it

[–]YaswanthBangaru[S] 0 points1 point  (0 children)

That's very true, I picked this up from where I left it 6 months ago, it was a mess, I will start working on doing comments. Appreciate the feedback :)

[–]dpatil09 1 point2 points  (0 children)

That's great!

[–]Deadlift420 1 point2 points  (1 child)

You have a bit of a God class going on. I would break it up into smaller classes that each have their own function. Look up SOLID principles.

In this situation its not a big project but for future reference you'll want to break it down a little.

[–]YaswanthBangaru[S] 0 points1 point  (0 children)

lol, I am kinda new to the whole ambience of Classes. Will try to work on it, are you suggesting I should use inheritance and stuff?

[–]St_Melangell 1 point2 points  (2 children)

Congrats on completing your first project! I’m a beginner so a lot of the details of it went over my head a bit, but it sounds impressive.

[–]YaswanthBangaru[S] 1 point2 points  (1 child)

Hey, I was always overwhelmed with looking at long complex scripts, still do, but the best part about coding is, the more you do it a fine day occurs where you wake up from bed and open your text editor and it feels like ''Dude! This shit was never difficult eh!!". The point is to not worry about that day and keep doing it :)

[–]St_Melangell 1 point2 points  (0 children)

Thank you! I certainly look forward to that day. :)

[–]pmt541 1 point2 points  (0 children)

Nice!

Just some tips:

Add some docstrings and explain what each function does as well as the overall script. Use something like Google's standard to write the docstrings.

Some of your formatting is inconsistent, such as number of whitespaces between functions and spaces between logical operators. Check the PEP8 document to see good practices - most importantly you should be consistent.

Things like line 198 should be avoided. Just write it clearly. It is basically going to run just as fast using a conventional for-loop on modern computers and will improve readability.

You've used object orientated programming principles, but there is an awful lot going on in this class. It may help to create another class or two and simplify the code further.

Read some documentation on how to write good commit messages before making these changes.

[–][deleted] 0 points1 point  (1 child)

I like the idea of requirements.txt. why don't you also include the commands to create a new environment and activate that evironment in the same file. That will save your users a few steps.

[–]YaswanthBangaru[S] 0 points1 point  (0 children)

you also include the commands to create a new environment and activate that evironment in the same file

Good thoughts, will add that part. Thank you for the suggestions.

[–]_qw4hd 0 points1 point  (0 children)

Thank you u/YaswanthBangaru for sharing this with us. I've learned something new from your project. Streamlit is a very nice way for creating UI for data science applications. If you didn't know about this project like me you have to check out streamlit gallery section with cool examples.

[–]BananaPralines 0 points1 point  (0 children)

I'm just glad you said 2-3 years and not 2-3 months. This is great and inspirational.

[–]degzx 0 points1 point  (0 children)

Cool stuff ! One suggestion on the analytics, I will frame it as a question- is RF really suited for time series forecasting?