Probabilistic programming and trading systems

Brian Wang of Next Big Future blog has an interesting article about recent developments in the field of probabilistic programming. Here is a description of the type of problems being explored with these methods:

Daphne Koller of Stanford University, for instance, is attacking very specific problems using probabilistic programming and has much to show for it. Along with neonatologist Anna Penn, also at Stanford, and colleagues, Koller has developed a system called PhysiScore for predicting whether a premature baby will have any health problems – a notoriously difficult task. Doctors are unable to predict this with any certainty.

PhysiScore takes into account factors such as gestational age and weight at birth, along with real-time data collected in the hours after birth, including heart rate, respiratory rate and oxygen saturation (Science Translation Medicine, DOI: 10.1126/scitranslmed.3001304). “We are able to tell within the first 3 hours which babies are likely to be healthy and which are much more likely to suffer severe complications, even if the complications manifest after 2 weeks,” says Koller.

“Neonatologists are excited about PhysiScore,” says Penn. As a doctor, Penn is especially pleased about the ability of AI systems to deal with hundreds, if not thousands, of variables while making a decision. This could make them even better than their human counterparts. “These tools make sense of signals in the data that we doctors and nurses can’t even see,” says Penn.

As someone obsessed with the idea of automated trading, whenever I read such articles, I immediately think about how they can be applied to trading. One of the key aspects of probabilistic programming is that it can deal with ambiguous, uncertain, and incorrect data. Thus the medical diagnosis applications are of great interest to trading systems developers as the problems have many similarities. For example, in medical applications, the data is comprised of diagnostics from various instruments, which can contain errors, as well as subjective inputs such as “patient was sweating profusely”, “patient had difficulty breathing”, etc. For trading applications, analogous inputs would be various technical indicators (moving averages, RSI, etc.), put/call ratios, breakouts, P/E, etc. Subjective information could be is the market in a secular/primary/secondary bull/bear phase. One can also envision chartists entering information such as head-and-shoulders, flags, ascending/descending triangles, etc.

How would probabilistic programming be applied to trading systems? What I am about to say is nothing more than conjecture based on limited experience with more conventional machine learning algorithms such as neural networks and genetic algorithms, so it should be taken with a large grain of salt. Suppose we wanted to trade stock index futures or ETFs composed of individual stocks. To calibrate our model, we will break up the time series of the index into winning trades (defined as a minimum of 1.5:1 reward:risk), flat trades (1:1 < reward:risk < 1.5:1), and loosing trades (all others). At the time of initiation of a trade, we then add any type of data we think would influence the future price of a stock. This would include technical indicators and fundamental data. The data for each stock would be weighted to reflect the weighting of the stock in the index. The input data would then be mapped to the known output, which is the type of trade that would have resulted. Further refinement could be to divide wining trades into more categories by reward:risk or time to reach a given reward:risk. To apply this to actual trading, the inputs would be presented to the code each day and the signal would tell the trader to go long/short/flat. This is a sketch of one way to use this technology to construct a trading system. I have not addressed such issues as risk management/position sizing, portfolio construction, etc. Also, there are clearly other ways to apply probabilistic programming to trading (reading balance sheet information to detect accounting fraud?). I intend to keep my eye on developments on this technology.

Add to FacebookAdd to DiggAdd to Del.icio.usAdd to StumbleuponAdd to RedditAdd to BlinklistAdd to TwitterAdd to TechnoratiAdd to FurlAdd to Newsvine

Advertisements
This entry was posted in Narrow Artificial Intelligence and tagged , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s