12

After having done a lot of research on the topic I found the following excellent research piece on ETF.com: Wealthfront modifies historic asset-class returns with current market implied expected returns (Black-Litterman) as well as with the in-house views of Chief Investment Officer Burton Malkiel’s team. In addition, Wealthfront sets minimum and ...


11

The following link has a good summary of a typical pair trading strategy: https://www.quantstart.com/articles/Backtesting-An-Intraday-Mean-Reversion-Pairs-Strategy-Between-SPY-And-IWM It actually has full python code as well. It doesn't include a cointegration check though. Edit: if X and Y are cointegrated: calculate Beta between X and Y ...


10

I think you might find this answer in The future language of quant programming? useful. People get this problem wrong because they always end up discussing the theoretical advantages of these languages rather than the practical uses of these languages. Theoretically speaking: Haskell is elegant and has many of the theoretical advantages (language ...


8

You can find an exact algorithm with a step-by-step explanation here: https://www.dropbox.com/s/t4fq067kzx26mhw/project_paper.pdf As you can see from the URL it is an archived document because the original site is unfortunately long gone and the tool referenced in the paper with it :-( But it should be helpful anyway to understand what is going on. Notice ...


7

I just made a Genetic Algorithms calculator you can try at http://www.gregthatcher.com/Stocks/GeneticAlgorithmCalculator.aspx I'm not a "quant expert" like all of you (I'm just a programmer), but here is what I've found. 1.) If you set the constraints up correctly, the results are amazing. e.g. you can get portfolios that have very high return and low risk....


7

I was searching for answers to the same question and came across your question. After some thought and research, here is the plan I have developed. I will be working in Python. Calculate relative maxima and minima with SciPy. Calculate RSI at those points using lib-ta. For each pair of lows and highs, compare the change in price with the difference in RSI. ...


6

One idea is Dynamic time warping (DTW). There is an R package for that: dtw Here is the vignette:Computing and Visualizing Dynamic Time Warping Alignments in R: The dtw Packageby Toni Giorgino And here is an example from Systematic Investor with full code: Time Series Matching with Dynamic Time Warping


6

Hello people. This is quite a complex problem if you want to solve this in a computationally efficient way for a rolling window. I have gone ahead and written a solution to this in C#. I want to share this as the effort required to replicate this work is quite high. First, here are the results: here we take a simple drawdown implementation and re-...


5

Assume $p_i(x)$ is a payoff of one particular option. You can try to reproduce the diagram using a bunch of options with strikes on the breakpoints (underlying is useless, because its payoff can always be modelled by buy&sell of a certain call and put). Then you can create a system of k equations with n unknowns (number of each kind of option). All other ...


5

Well, I did some modest research on this topic, looking at peers. Most of them use Modern Portfolio Theory, see this pic: You can find this small survey here: https://www.linkedin.com/pulse/roboadvisors-like-commodore-vic20-apparently-according-raffaele-zenti?trk=mp-reader-card The sector, I mean Roboadvisors, has a lot of disruption potential, obviously....


5

I would create categories, and work on risk parity among the categories. Otherwise, variance is not really a good measure of downside risk: Change your risk measure, use a rolling window historical VaR or Expected Shortfall at some horizon that matches your investment style. downside semi-variance could do the trick too if don't want to change your algo ...


5

Unfortunately, there is no correct answer for this question, it's like what car you should drive on your weekend. C++ is a popular language in quantitative finance, but it's usually (but not always!) only used to build the application backbone, such as derivative pricing. Why C++? C++ is a good choice because C++ is platform independent, we can natively ...


4

I've read this question and the other question you asked and I hope I can help. The important thing to realize that in any market multiple market makers operate and they are all trying to optimize their risk adjusted return. A market maker earns a return buying low and selling high. Suppose you are the only market maker and you quote this spread: 1 | Bid ...


4

Based on an my updated understanding of your problem you have a portfolio consisting of $N$ illiquid assets. Valuations are not real time and usually lagged, by say, upto 3 months (or slightly longer), but at least valuations correspond to a consistent timestamp (or otherwise you interpolate a consistent timestamp). You want to construct a predictive model ...


3

This problem is not interesting enough, because putting your money in the bank guarantees you zero volatility (and a zero return on investment). In practice, whatever set of assets you chose you would get a very extreme solution (e.g. 100% weight on one asset with very low volatility.) With a minor tweak, you can get a very interesting problem. You can ...


3

Since there is a closed form in the BS case for continuous barrier options, you probably won't find a huge amount of work on this since it's not needed. In the discrete case, I did a paper with Tang: http://ssrn.com/abstract=1441142 Pricing and Deltas of Discretely-Monitored Barrier Options Using Stratified Sampling on the Hitting-Times to the Barrier


3

I know this is a really old question but here is something I ran into while trying to do essentially the same thing. One of the problems that you face when trying to detect patterns using (say) k means clustering is how do you encapsulate a pattern. For example, suppose on a certain day the index goes up 2% over a minute and then goes down 1% over the next ...


3

How about an O(N log(n)) solution ? To be a viable trading strategy, you often expect them variances to be similar, so just calculate ordinary volatility and put it in an ordered array. Of course that's going to be period dependent, so pick a few arbitrary periods and see which instruments end up being together. Then you get clusters of vastly smaller ...


3

In Python, a very slick implementation that exploits the rolling functionality in pandas is like this import pandas as pd def get_max_dd(nvs: pd.Series, window=None) -> float: """ :param nvs: net value series :param window: lookback window, int or None if None, look back entire history """ n = len(nvs) if window is None: ...


3

I have experience of C# as a strategy client at the end of a VB .Net ticker plant. The latency fluctuations caused by the garbage collection could be in the order of seconds! And occurred every four or five minutes with a stream of a 1000-ish ticks a second. I was the first engineer to test our trading system in this way, it was a shock to all concerned and ...


3

Two papers by AQR might be of use: Asvanunt, A. and S. Richardson (2016), “The Credit Risk Premium”: Despite theoretical and intuitive reasons for a credit risk premium, past research has found little supporting empirical evidence. This is primarily due to biases in computing credit excess returns which improperly account for term risk. Using data ...


3

As volatility has a great influence on option prices, you'd like to sell options in high volatility environments and purchase options in moments of low volatility. But what is high/low volatility? Implied volatility rank (IVR) and implied volatility percentile (IVP) tell you this. The implied volatility rank is given by $$IVR=\frac{IV-52Low}{52High-52Low},$$...


2

Another reason for C++ is control, or at least the illusion of it. If you really care about what exactly is going to happen and when it is going to happen then C++ is the best option. If you are prepared to put in the effort you can know and control everything all the way down to the metal. Of course the price for more control in C++ is that you often have ...


2

I believe what you are looking for is called Seasonal pattern. Here is a good source - http://signalfinancialgroup.com/Seasonal/SeasonalOverview.php


2

I'd recommend M. Joshi and T. Leung "Using Monte Carlo simulation and importance sampling to rapidly obtain jump-diffusion prices of continuous barrier options". Though it assumes jump-diffusion process for the returns it is straightforward to obtain the scheme for a diffusion process. Also Paul Glasserman's [book][2] [2]: http://www.amazon.com/Financial-...


2

This may not directly answer your questions. There's a class offered by Georgia Tech called Machine Learning for Trading, you might find it useful. https://www.udacity.com/course/machine-learning-for-trading--ud501


2

There are many resources on the web but you need to think why you would want to do this in the first place. Are there not packages or frameworks out there already that will do what you need? Also backtesting or any financial trading platform will be suited to a specific style or method of backtesting. Some are vectorised iterative processes (e.g. just a big ...


2

In this blog post I describe how to backtest trading strategies with R: Backtest Trading Strategies Like a Real Quant It gives a step-by-step template which consists of the following steps: Load libraries and data Create your indicator Use indicator to create equity curve Evaluate strategy performance Details and the fully documented code can be found in ...


2

To me, that smelled like dynamic programming too. After implementing a dynamic programming solution according to http://www.cs.rpi.edu/~magdon/courses/cf/notes/optimal.pdf and other sources from the same author, it dawned on me that dynamic programming might not really be necessary at all. In the end, what you want is to put all your value into the single ...


Only top voted, non community-wiki answers of a minimum length are eligible