1 / 44

Quantitative Trading Strategy based on Time Series Technical Analysis

Quantitative Trading Strategy based on Time Series Technical Analysis. Group Member: Zhao Xia Jun Lorraine Wang Lu Xiao Zhang Le Yu. What’s new from the paper. Michel Fliess . Cédric Join Time Series Technical Analysis via New Fast

zach
Download Presentation

Quantitative Trading Strategy based on Time Series Technical Analysis

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Quantitative Trading Strategy based on Time Series Technical Analysis Group Member: Zhao Xia Jun Lorraine Wang Lu Xiao Zhang Le Yu

  2. What’s new from the paper Michel Fliess. CédricJoin Time Series Technical Analysis via New Fast EstimationMethods: A Preliminary Study in Mathematical Finance. (2008, Coventry, United Kingdom.)

  3. What’s new from the paper • New fast estimation methods are applied to “Model-free” setting • Via repeated identifications of low order linear difference equations on sliding short time windows • Applying signal processing technique on finance

  4. What’s new from our project • As the paper did not discuss any trading strategy, we come up with all the strategies by ourselves based on the techniques from the paper.

  5. Tools and Packages • Matlab 2010 • Signal Processing Toolbox • This toolbox is included in Matlab starting from version 2010

  6. Data • Data: EUR/USD & GBP/USD & AUD/JPY Exchange Rates • Source:: eSignal software • Frequency: One Hour Interval • In-Sample: Major analysis are done with data from 2009 quarter 4 to 2010 quarter 1. • Out-of-Sample: The strategies are back tested on the following 1 year data, i.e. 2010 quarter 2 to 2011 quarter 1.

  7. Inputs, outputs and measurement • Trading decisions are made at the end of each hour. • Decision related inputs are only close price of that hour (as well as past prices). • The most important measurement of performance is the cumulative value of 1 dollar after 1 year. • Sharpe Ratio, maximum drawdown, and percentage correct are also output. • Assume no leverage, no transaction cost, and the deposit for a short position is its price.

  8. Briefly about our work • Although the paper applies signal processing techniques on finance, it provides no trading strategies. • We aim to focus on these new techniques and develop strategies that may work under indicators from the new techniques. • We may use all the techniques, or part of, mentioned in the paper, in our strategies.

  9. Strategies • Use filtering technique only (1 strategy) • Use filtering and z-transform (2 strategies) • Use moving average on error terms (1 strategy)

  10. Strategy 1: Filtered Price Indicator • Blue line: market prices • Green line: filtered prices • Strategy 1 is to base trading decisions on the difference between blue and green lines at each period.

  11. Strategy 1: Filtered Price Indicator • We should use information up to each period. As the filtered price would be different if we provide it with future prices. (see period 1874)

  12. Strategy 1: Filtered Price Indicator • The author of the paper believes the average of the difference (errors) between filtered prices and market prices approaches to zero. So a large departure of market price and filtered price is unlikely. • A simple strategy: • Buy if filtered price (of this period) is much higher than close price (of this period); • Sell if filtered price (of this period) is much lower than close price (of this period). • Refer to “qt_Strategy_FilteredPriceIndicator.m”

  13. Strategy 1: Filtered Price Indicator • Result:

  14. Strategy 1: Filtered Price Indicator

  15. Strategy 1: Filtered Price Indicator

  16. Strategy 2: Simple Prediction • The paper uses z-transform and non-linear system to get coefficients of the equation on filtered prices: • When applying these coefficients on the market prices, we can get predictions of future prices. • Refer to: “qt_GetSinglePrediction.m”

  17. Strategy 2: Simple Prediction • Blue line: Market Prices; • Green line: Filtered Prices • Red line: Forecasted one-period-after price

  18. Strategy 2: Simple Prediction • Buy when current price is lower than predicted future price • Volume depends on the prediction length (i.e. number of prediction made) • E.g. volume=1 when prediction length=1, i.e. predict only for next time bar • E.g. volume=2 when prediction length=2 and both predicted prices for next 2 time bars are above current price • Sell when current price is higher than predicted future price • Close the open position when the prediction shows a change of price direction • Refer to: “qt_Strategy_SimplePrediction.m”

  19. Strategy 2: Simple Prediction • Result

  20. Strategy 2: Simple Prediction

  21. Strategy 2: Simple Prediction

  22. Strategy 3: Simple Mean Reverting • The difference between market price and filtered price is believed to be around zero. So we can play mean reversion on the spread of filtered price and market price. • However, this spread is not tradable. • We develop our strategy in this way: • If the spread is too large, consider it an opportunity first; • Examine whether the change in filtered price would likely offset the significance of the spread; • If not so, enter into new position; • We can achieve it with prediction coefficients (same as we used in strategy 2).

  23. Strategy 3: Simple Mean Reverting • There will be at most 4 threshold in this strategy. Running optimization for these threshold is extremely time-consuming. • We did only for EUR/USD pair and apply the same thresholds on the other two pairs • Refer to “qt_Strategy_SimpleMeanReverting.m”

  24. Strategy 3: Simple Mean Reverting • Result:

  25. Strategy 3: Simple Mean Reverting

  26. Strategy 3: Simple Mean Reverting

  27. Strategy 4: Moving Average • Moving averaging is the main beautiful result of the paper; • It is suggested by the author of the paper that moving average of errors goes to zero in time:

  28. Strategy 4: Moving Average • In the paper, on daily USD/EUR series, with window size of 100, this model can achieve >80% accuracy in trend prediction. 

  29. Strategyby moving average Strategy 4: Moving Average • However, in our work, moving average doesn't go to zero always. • moving average of error terms under different window sizes at 20091201

  30. Strategyby moving average Strategy 4: Moving Average • At the same time, the prediction power of moving average seems to be "only better than bet" in our half-year sample

  31. Strategyby moving average Strategy 4: Moving Average • Forecast Accuracy – if moving average can predict future price (based on AUD/JPY data from 2009Q4 to 2010Q1)

  32. Strategyby moving average Strategy 4: Moving Average • Forecast Accuracy – if moving average can predict future filtered price (based on AUD/JPY data from 2009Q4 to 2010Q1)

  33. Strategy 4: Moving Average • Even the result of the paper can be remade here, it only captures the difference of price and trend. This spread is not tradable. (even the spread narrows as expected, the direction of market price may vary.

  34. Strategy 4: Moving Average • We develop a similar strategy • Simple moving average equally considers new information and n-period past information. The entry of new price and the leave of past information cause same important pulse in moving average. • To avoid complex weighted average, we choose to use two moving average indicators, so that recent information become more important and the leave of one single past price will not affect the indicator too much.

  35. Strategy 4: Moving Average • Buy if both two moving average are below zero • Sell if both two moving average are above zero • Refer to “qt_Strategy_MvAvg.m”

  36. Strategy 4: Moving Average • Result

  37. Strategy 4: Moving Average

  38. Strategy 4: Moving Average

  39. Strategy 4: Moving Average – Optimized Parameters • Next consider there exists an optimal position to every moving average value. • Inspired by the result of mean-reverting example in class, we assume the optimal position is • MV1 and MV2 stand for two value of moving average • Visit this expression only if both moving average are negative (positive) • The optimal position is positive related to the size of moving average, but if it’s too large, the position would also decrease

  40. Strategy 4: Moving Average – Optimized Parameters • Fix a=1 in above expression. We run optimization for four parameters: window size of MV1, window size of MV2, order multiplier in FIR, and b in last expression. • Optimization run on 2009Q4 to 2010Q1 data; • Performance result plot for 2010Q2 to 2011Q1. • Due to great amount of computation needed, we run for EUR/USD only at this moment.

  41. Strategy 4: Moving Average – Optimized Parameters 1 year account value EUR/USD (2010Q2 to 2011Q1) window1=4; window2 =40; p=0.75; b=8

  42. Strategy 4: Moving Average – Optimized Parameters 1 year account value AUD/JPY(2010Q2 to 2011Q1) window1=4; window2 =40; p=0.75; b=8

  43. Strategy 4: Moving Average – Optimized Parameters 1 year account value GBP/USD (2010Q2 to 2011Q1) window1=4; window2 =40; p=0.75; b=8

  44. Summary • Mathematics • In this project, we successfully replicated all the mathematical terms described in the paper, including filtered price, z transformation and moving average errors. • Achievement • We developed 4 strategies by applying the mathematical terms as trading indicators. • Impressive return was achieved especially with Strategy 4: moving average of the error terms • Further work • Leverage, commissionand slippage can be included in the trading model • Optimization can be applied on many trading parameters

More Related