Skip to content

Comment on Python for Finance

Comments

I've read some great books from Packt, this wasn't really one of them. When the first thread was on HN, I got excited because I love Python and had been looking into starting some investments. Namely, I want to implement a low-risk, low-frequency automated trade strategy. Naively, I assumed this book would be for people who knew Python and were interested in learning finance, but it was the opposite. A lot of concepts were thrown out there with little to no explanation. I gave up reading it until I actually know finance, and can use it as a cookbook.

The code in the book is also shoddy. I don't have it with me, but two examples come to mind. I didn't run any of the examples, but eyeballing them I some of them wouldn't run because of syntax errors -- rather unfortunate for a beginner's text. The section of naming conventions. To write a program using a financial expression like P(1+r)n (exponential growth/decay), the book recommends against using confusing variables like p... in favor of P. P stands for Principal in this case, and I doubt many of you knew that off hand.

For those looking to do finance in Python, I recommend looking into QuantLib[1]. I'm also watching a series of videos from the University of Michigan's online Intro to Finance class on YouTube[2]; however I realized a few days ago that they're probably pirated. That makes me feel bad, but its still a good reference.

If any quants on HN have some better book recs, they would be strongly appreciated.

Edited to add; To be fair, I haven't really touched the section on Monte Carlo simulations, which seems to be the bulk of the value.

[1] quantlib.org

[2] https://www.youtube.com/watch?v=pQeZqn-8yM8&list=PL07D40483B...

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.