HNHacker News
TopNewBestAskShowJobs

shogunmike

1,208 karma · joined December 5, 2007

submissionscomments
shogunmike··on Linear Algebra for Deep Learning: Matrix Algebra
You're correct - it doesn't get into the deep learning aspect yet.

This article is in fact the second part of a larger planned series. The idea is to present more depth than a "quick refresher" that seems to be common to a lot of blog posts, but far less material than would be found in a 10-week (or single semester) undergraduate course.

Thanks for the Stanford link. I'll check it out.

shogunmike··on Linear Algebra for Deep Learning: Matrix Algebra
Indeed - I recommended Strang's book in this article and the previous one.
shogunmike··on Udacity the new ITT Tech?
Disclaimer: I run a site discussing Python/ML topics as applied to quant finance.

Python is primarily used because the machine learning libraries within it are very mature and play nicely with each other.

It is easy to get started in Python (and most of its libraries) by downloading the freely-available Anaconda distribution. This usually "just works", cross-platform. The language itself is extremely straightforward to pick up.

Within the Python ecosystem there are many mature libraries. In particular NumPy was written for carrying out vectorised computation. This enabled more libraries, such as pandas (for dataframe manipulation), SciPy (for general scientific computation) and scikit-learn (for ML) to be developed. Each of these libraries also possess clean and consistent APIs for carrying out their specialty tasks.

Thus it becomes straightforward in Python to import data from many sources, "wrangle" it into the correct format (even with real-world, messy data), put it into an ML data pipeline and then visualise it easily (via Matplotlib or Seaborn). In addition there is Jupyter for straightforward "notebook" style research.

Finally, Theano and TensorFlow are two great deep learning libraries. There are a few hiccups on installation sometimes, but for the most part they "just work".

There are still some "missing pieces" however. The statsmodels library does a good job of time series analysis, but it doesn't yet compete fully with R in this respect.

Julia is also likely to make serious inroads into Python's usage in the near future. I'm excited about where the project is heading.

shogunmike··on How to Learn Advanced Mathematics Without Heading to University – Part 3
Thankyou for the necessary feedback!

I'm actually in the process of overhauling the design of the site, particularly with regards to mobile, as the current Bootstrap-derived design pushes all sidebar content to the top on mobile/table.

shogunmike··on How to Learn Advanced Mathematics Without Heading to University – Part 3
Indeed, this is the latest article and it does link back to parts 1 & 2.

Each part of the series is designed to cover the "typical" modules on a UK four-year undergraduate Masters of Mathematics degree.

However, it can be challenging in the latter two years to include a broad enough set of modules to cover all interests, so I have had to stick to those "core" modules likely to be found in many degrees, as well as those more specifically related to quant finance and machine learning.

However, it is my hope that individuals will be motivated to look at other areas as well, even if they're not directly related to career paths!

shogunmike··on Introduction to Zipline: A Trading Library for Python
Disclaimer(s): QuantStart.com founder here, background as a quant dev at a small fund.

I should probably nuance my statement that it is easy to find trading strategies by saying that it is easy to find new trading /ideas/. There are a huge number of freely available trading ideas on forums, pre-print servers (arXiv, SSRN), blogs etc. The trick is knowing how to implement them properly, accounting for any transaction costs and adjusting the parameters of the model. This is often where the stated performance falls down. It takes a lot of time to carry out this sort of research.

Long-term profitable strategies are tricky to find, due to the ever-present spectre of "alpha decay". This is where your strategy's edge is "arb'd out" - everyone else knows what you're doing and so there's no tradeable edge anymore. Hence it is necessary to have a portfolio of strategies and gradually phase out the ones that aren't doing well, and bring in new ones over time.

That being said there are a large number of trend following funds (known as Commodity Trading Advisors, or CTAs, in the industry) that all broadly do the same thing (follow "trends" in the commodity futures markets) and have great years every now and then. There are some well-known "retail" quant traders who do well by trend following, but it does require quite a bit of capital to trade in futures.

The philosophy that I do try to emphasise is to always be learning and researching new ideas. Also, as you mention, I'm pretty keen on discussing the math(s)/statistics aspect because once you have a solid math capability, it is easier to see where potential edges might exist and how to really assess whether it is a true "edge" or just a statistical anomaly.

I believe someone else in a grandchild comment below said that there are many areas that bigger quant funds won't touch because of institutional incentives. If you have $10bn assets under management (AUM), then you're not going to care about investing $100-200k, even if the returns are good, because it won't move the needle on your monthly reports.

The trick is to niche down into markets that you can spend a lot of time researching to find a distinct edge, that won't likely be touched by bigger funds. One area that is becoming interesting recently, due to the prevalence of satellite data/AI/deep learning-esque VC-backed startups, is building commodity supply/demand models. A good example is forecasting oil supply/demand by analysing large quantities of storage tank heights in global refineries [1].

Also, a small related-to-Zipline plug: I've recently started a free Python-based MIT-licensed open-source backtester [2], predominantly as a learning tool for programming and quant trading. There's about 4-5 of us working on it at the moment and it's in an early alpha stage, but we're always looking for people willing to help.

[1] - https://orbitalinsight.com/solutions/ [2] - https://github.com/mhallsmoore/qstrader/

shogunmike··on Deep Reinforcement Learning
You might find the VizDoom project interesting: http://vizdoom.cs.put.edu.pl/
shogunmike··on How to Learn Advanced Mathematics Without Heading to University – Part 2
When researching for the article I was actually rather surprised that I couldn't find many MOOCs on aeronautical, civil, electrical, chemical or mechanical engineering.

While it's pretty straightforward to find open courses/content on Linear Algebra and Calculus, there's very little on, say, Compressible Flow/Gas Dynamics or Turbomachinery, for instance.

If anybody knows of any courses on topics related to the above engineering disciplines, I'd love to take a look.

I also agree that at the end of part 2, one would have sufficient "mathematical maturity" to handle most commercial environments.

shogunmike··on Markov Chain Monte Carlo for Bayesian Inference – The Metropolis Algorithm
Also, John Kruschke's "Doing Bayesian Data Analysis", aka the "Puppy Book", is a gentle introduction to Bayesian inference. It is very readable, especially with regards MCMC.
shogunmike··on Markov Chain Monte Carlo for Bayesian Inference – The Metropolis Algorithm
There is also a bit of historical discussion on Wikipedia about this: https://en.wikipedia.org/wiki/Metropolis%E2%80%93Hastings_al...
shogunmike··on How to Learn Advanced Mathematics Without Heading to University
Thanks for sharing this. It's good to hear from others who have been through similar experiences!

I fully agree with you that one needs to think in terms of years and not days, weeks or even months. I do make this point in the article, as well.

shogunmike··on How to Learn Advanced Mathematics Without Heading to University
Thank you for pointing out my mistake! Indeed, that was a slip of mine to write about continuous functions, assuming they had derivatives.
shogunmike··on How to Learn Advanced Mathematics Without Heading to University
That depends primarily on your favoured learning style. MOOCs are certainly changing the available resources and lecturers are publishing freely available notes for particular courses on their home pages.

Unfortunately some textbooks can be expensive, but some are more reasonably priced. Unfortunately, the more "niche" the mathematical area becomes, the harder it becomes to find freely available sources.

I personally prefer a mix of video lectures and textbooks. Being able to watch video lectures, with the ability to pause and rewind, is a very useful feature that is not available in live lectures!

shogunmike··on How to Learn Advanced Mathematics Without Heading to University
One famous, although admittedly not particularly recent, example of a mathematical autodidact is Srinivasa Ramanujan (https://en.wikipedia.org/wiki/Srinivasa_Ramanujan).
shogunmike··on Ask HN: What are some good Machine Learning resources?
I know...some of them are indeed expensive!

At least the latter two ("ISL" and "ESL") are free to download though.

shogunmike··on Ask HN: What are some good Machine Learning resources?
Some good books on Machine Learning:

Machine Learning: The Art and Science of Algorithms that Make Sense of Data (Flach): http://www.amazon.com/Machine-Learning-Science-Algorithms-Se...

Machine Learning: A Probabilistic Perspective (Murphy): http://www.amazon.com/Machine-Learning-Probabilistic-Perspec...

Pattern Recognition and Machine Learning (Bishop): http://www.amazon.com/Pattern-Recognition-Learning-Informati...

There are some great resources/books for Bayesian statistics and graphical models. I've listed them in (approximate) order of increasing difficulty/mathematical complexity:

Think Bayes (Downey): http://www.amazon.com/Think-Bayes-Allen-B-Downey/dp/14493707...

Bayesian Methods for Hackers (Davidson-Pilon et al): https://github.com/CamDavidsonPilon/Probabilistic-Programmin...

Doing Bayesian Data Analysis (Kruschke), aka "the puppy book": http://www.amazon.com/Doing-Bayesian-Data-Analysis-Second/dp...

Bayesian Data Analysis (Gellman): http://www.amazon.com/Bayesian-Analysis-Chapman-Statistical-...

Bayesian Reasoning and Machine Learning (Barber): http://www.amazon.com/Bayesian-Reasoning-Machine-Learning-Ba...

Probabilistic Graphical Models (Koller et al): https://www.coursera.org/course/pgm http://www.amazon.com/Probabilistic-Graphical-Models-Princip...

If you want a more mathematical/statistical take on Machine Learning, then the two books by Hastie/Tibshirani et al are definitely worth a read (plus, they're free to download from the authors' websites!):

Introduction to Statistical Learning: http://www-bcf.usc.edu/~gareth/ISL/

The Elements of Statistical Learning: http://statweb.stanford.edu/~tibs/ElemStatLearn/

Obviously there is the whole field of "deep learning" as well! A good place to start is with: http://deeplearning.net/

shogunmike··on Installing Nvidia CUDA on Ubuntu 14.04 for Linux GPU Computing
I actually tried this a few months ago. I had some issues trying to run the typical vector addition "Hello world!" examples on my system.

I'm not 100% sure but I also think that by installing the nvidia-cuda-toolkit package it leaves out the CUDA samples. These contain the deviceQuery and bandwidthTest scripts necessary to check that CUDA is functional.

Admittedly I have two consumer cards in SLI, so that may have affected the install. It could also have been incompatibility between the actual Nvidia display drivers and the various dependencies. It's a bit messy!

shogunmike··on Installing Nvidia CUDA on Ubuntu 14.04 for Linux GPU Computing
Indeed, I had quite a bit of trouble getting it to work prior to this. The main issue seemed to be compatibility with Ubuntu packaged Nvidia drivers of various versions. It's certainly not as straightforward as it could be.
shogunmike··on Installing Nvidia CUDA on Ubuntu 14.04 for Linux GPU Computing
You're right. High-frequency trading is already using FPGA and ASICs.

GPU-HPC is still used heavily (within finance) for derivatives pricing techniques, via Monte Carlo and Finite Difference methods.

shogunmike··on Installing Nvidia CUDA on Ubuntu 14.04 for Linux GPU Computing
If only it was this easy in Ubuntu :-)
shogunmike··on Ask HN: How much traffic to expect if your project hits HN front page?
I've had a few posts hit the front page over the last couple of years. I had between 5,000 and 10,000 unique visitors (as Google Analytics defines them) over the following 24hrs for each post.
shogunmike··on Value at Risk for Algorithmic Trading Risk Management – Part I
You're quite right actually! I probably haven't been as explicit as how hidden the risks are when using VaR. Although, within other articles I've tried to make the point that any risk management strategy should be utilised as part of a larger framework.

It is a shame that risk management often takes a back-seat to "alpha generation", as solid implementation of the former is what keeps funds (and retail traders) in business.

shogunmike··on Parallelising Python with Threading and Multiprocessing
I was going to discuss Parallel Python (http://www.parallelpython.com/) in the next article - have you used that? How does it compare to joblib?
shogunmike··on Parallelising Python with Threading and Multiprocessing
I agree, the scope of the article is somewhat specific to the "toy" example presented.

Generally I would use C++ or (gasp!) Fortran with either MPI or CUDA for these sorts of tasks if performance was the most critical factor.

I'm excited by the Julia language though!

shogunmike··on Parallelising Python with Threading and Multiprocessing
I was considering adding this but I wasn't fully sure that it would be good content for a "first intro to parallel programming" article. Perhaps a good candidate for the next one?

Thanks for mentioning it though.

shogunmike··on Parallelising Python with Threading and Multiprocessing
Wow - that is significantly more elegant than what I discussed in the article!

I wasn't aware of the concurrent.futures library, thanks for pointing it out.

shogunmike··on Using Python and Pandas to Create Continuous Futures Contracts
Futures linked ETFs in general are a great approach that have really helped "retail" traders get access to a previously difficult market.

Ernest Chan provides some good examples re GLD/GDX spreads, for instance.

shogunmike··on Using Python and Pandas to Create Continuous Futures Contracts
A nice algo with a good Sharpe. Although I'm not sure I could stomach a 37% drawdown!
shogunmike··on Using Python and Pandas to Create Continuous Futures Contracts
Indeed I probably should have stated more carefully how leveraged futures contracts can be.
shogunmike··on Using Python and Pandas to Create Continuous Futures Contracts
I do wonder whether zoologists are now continually frustrated with the Python data analysis ecosystem when they perform their Google searches :-)
Page 1 of 4Next →