top of page
Search

Going the Extra Mile



Introduction


Hi guys it's been a while. Quick life update - I've joined college. And as you can imagine things are quite busy, but I still want to write this blog - after all, this one's about going the extra mile:) So apart from my main courses on CS this sem, I also have a course on financial management. Essentially what they teach us is this: the main goal of any corporation is to maximise the shareholders wealth. (Yea, I too was hoping for something less evil). Ok that's enough context for introduction.


Seminar Presentation


As part of the course, our class was divided into sub groups of about 3 - 4 members and each group had to present one topic in class. Our group's topic was on calculating the Beta value of stocks. If you don't know what that is, don't worry - the understanding is not required for the rest of the blog, but understanding Beta is required for making calculated investments.


So anyways, halfway through making the presentation I realised that it was quite complicated to calculate the Beta value manually.


As is with many of my previous projects, this was the moment I thought if there was a way to automate the calculation. And it turns out Yahoo Finance has an unofficial python module yfinance, which meant I could import the relevant stock data into python and perform calculations on it to find Beta!


Presentation Day


Our presentation went well and in the end, I introduced fm_beta.py to the class - "Courtesy of being the only CS student here, I had to create a program that calculates Beta". Everyone laughed and smiled, not necessarily because of the program, but because it failed:_)


The program was inaccurate by ~10%. (What were you expecting Manas - your 54 line program obviously cannot compete against Yahoo hahha).


Conclusion


Closing the lid of my laptop that day, I wondered - but if my program didn't work accurately, why did everyone still like it? Turns out, the effort and the thought is often just as important as the result. So don't wait to do something beyond what's asked of you. The extra mile, shouldn't really be extra:)


Source Code


For my fellow CS peeps who want to read the 54 lines, here it is: https://github.com/LOLIPOP-INTELLIGENCE/FM-BetaCalc






61 views0 comments
bottom of page