Mean Reverting Asset Trading

Slides:



Advertisements
Similar presentations
CHAPTER 4 BOND PRICES, BOND YIELDS, AND INTEREST RATE RISK.
Advertisements

Risk and Return in Capital Markets
Options, Futures, and Other Derivatives, 6 th Edition, Copyright © John C. Hull The Black-Scholes- Merton Model Chapter 13.
CIA Annual Meeting LOOKING BACK…focused on the future.
Spot Price Models. Spot Price Dynamics An examination of the previous graph shows several items of interest. –Price series exhibit spikes with seasonal.
Chapter 18 Exchange Rate Theories. Copyright © 2007 Pearson Addison-Wesley. All rights reserved Topics to be Covered The Asset Approach The Monetary.
Chapter 14 The Black-Scholes-Merton Model Options, Futures, and Other Derivatives, 8th Edition, Copyright © John C. Hull
Options By: Kyle Lau, Matthew Cheung, and Fabian Kwan.
Modern Navigation Thomas Herring
Copyright ©2004 Pearson Education, Inc. All rights reserved. Chapter 18 Asset Allocation.
By: Brian Scott. Topics Defining a Stochastic Process Geometric Brownian Motion G.B.M. With Jump Diffusion G.B.M with jump diffusion when volatility is.
Stock Market. 14 year old investor What are Some of Your Favorite Companies?
Dr. Hassan Mounir El-SadyChapter 6 1 Black-Scholes Option Pricing Model (BSOPM)
Introduction to Stocks Basics of Investing I Spring 2014 Accounting 101` K. Robinson.
Options, Futures, and Other Derivatives 6 th Edition, Copyright © John C. Hull Chapter 18 Value at Risk.
1 The Black-Scholes-Merton Model MGT 821/ECON 873 The Black-Scholes-Merton Model.
Alternative Measures of Risk. The Optimal Risk Measure Desirable Properties for Risk Measure A risk measure maps the whole distribution of one dollar.
Copyright: M. S. Humayun1 Financial Management Lecture No. 26 SML Graph & CAPM Closing Notes on Risk & Return.
Chapter 13 Wiener Processes and Itô’s Lemma
CHAPTER 5 BOND PRICES AND RISKS. Copyright© 2003 John Wiley and Sons, Inc. Time Value of Money A dollar today is worth more than a dollar in the future.
PMSP Portfolio Optimizer. What is PMSP? DOS-based statistical analysis program Calculates correlation between securities over a historical period Optimizes.
Fundamentals of Futures and Options Markets, 7th Ed, Ch 13, Copyright © John C. Hull 2010 Valuing Stock Options: The Black-Scholes-Merton Model Chapter.
QUINN GAUMER ECE 259/CPS 221 Improving Performance Isolation on Chip Multiprocessors via on Operating System Scheduler.
The Black-Scholes-Merton Model Chapter 13 Options, Futures, and Other Derivatives, 7th International Edition, Copyright © John C. Hull
Value at Risk Chapter 20 Options, Futures, and Other Derivatives, 7th International Edition, Copyright © John C. Hull 2008.
Mean Reverting Asset Trading Project Presentation CSCI-5551 Grant Meyers.
Mean Reverting Asset Trading Research Topic Presentation CSCI-5551 Grant Meyers.
Options, Futures, and Other Derivatives, 5th edition © 2002 by John C. Hull 16.1 Value at Risk Chapter 16.
Chapter 14 The Black-Scholes-Merton Model 1. The Stock Price Assumption Consider a stock whose price is S In a short period of time of length  t, the.
Chapter 13 Wiener Processes and Itô’s Lemma 1. Stochastic Processes Describes the way in which a variable such as a stock price, exchange rate or interest.
1 Finance School of Management FINANCE Review of Questions and Problems Part III: Chapter 7-9.
Stock Market Basics What you need to know…. What is a Stock? A stock is a piece of a company If you own a “stock” that means that you actually own a piece.
Chapter 14 The Black-Scholes-Merton Model
What to do with the second $10 million you earn!
Analysis and Management of Bond
Managing Money 4.
(Correlated to LCVS Educator Site Content)
Markowitz Risk - Return Optimization
Market-Making and Delta-Hedging
The Fundamentals of Investing
Economics-Engineering
Chapter 18 Asset Allocation
Team TLT Taehee Jung Lev Golod Temi N Lal
Risk and Return Fundamentals
Al-Imam Mohammad Ibn Saud University Large-Sample Estimation Theory
CHAPTER 5 BOND PRICES AND RISKS.
Chapter 2 – Properties of Real Numbers
Chapter 19 Asset Allocation.
The Fundamentals of Investing
CS 179 Lecture 17 Options Pricing.
The Black-Scholes-Merton Model
Chapter 15 The Black-Scholes-Merton Model
International Arbitrage And Interest Rate Parity
Investments: Chapter 11 Section 3
Mean Reverting Asset Trading
Spark vs Storm in Pairs Trading Predictions
Mean Reverting Asset Trading
Chapter 14 Wiener Processes and Itô’s Lemma
What is the business worth?
The Fundamentals of Investing
Chapter 15 The Black-Scholes-Merton Model
The Fundamentals of Investing
(-4)*(-7)= Agenda Bell Ringer Bell Ringer
The Fundamentals of Investing
Managing Money 4.
Chapter 11 Financial Markets.
Derivatives and Risk Management
Derivatives and Risk Management
Overview & backtesting
Investments: Analysis and Management Common Stock Valuation
Presentation transcript:

Mean Reverting Asset Trading Project Presentation CSCI-5551 Grant Meyers

Table of Contents Review Search Algorithm Parallelization Project Results

1. Review Mean Reverting Asset + Goal

Review – Mean Reverting Asset  

Example Mean Reverting Asset Example Generated with: data=RandomFunction[OrnsteinUhlenbeckProcess[0,1,.1],{0,15,.1}] ListLinePlot[data,Filling->Axis,AxesLabel->{HoldForm[Time],HoldForm[Worth]},PlotLabel->HoldForm[Mean Reverting Stock Price - Centered at 0],LabelStyle->{12,GrayLevel[0],Bold}] Via Mathematica. Due to OrnsteinUhlenbeckProcess being a random process, your generated graph will look different, but will maintain the properties required.

Goal – Price Selection We want to select 2 prices. Price 1 is ‘buy’ price, this is an upper limit of when to start purchasing shares. Price 2 is ‘sell’ price, this is a lower limit of when to start selling shares.

Goal – Price Selection Better:

Goal – Optimal Price Selection What are the best buy / sell prices for a given stock? How do we find these prices?

Goal – Optimal Price Selection What are the best buy / sell prices for a given stock? Specific per stock. How do we find these prices? Algorithmic search on historic data

Table of Contents Search Algorithm Review Parallelization Project Results

2. Search Algorithm Recursive Refinement Search

Mathematical Model for Asset Price A ‘Mean Reverting Asset’ is very similar to an Ito Process or Ornstein Uhlenbeck Process. This similarity allows for a mathematical definition / prediction of what the stock price will do. Search is based on historical data and recursively refined the more iterations the simulation is run. Ito Process: https://en.wikipedia.org/wiki/It%C3%B4%27s_lemma https://reference.wolfram.com/language/ref/ItoProcess.html Ornstein Uhlenbeck process: https://en.wikipedia.org/wiki/Ornstein%E2%80%93Uhlenbeck_process http://planetmath.org/ornsteinuhlenbeckprocess Stochastic Differential Equation: https://en.wikipedia.org/wiki/Stochastic_differential_equation

Stochastic Differential Equation   𝛼(𝛽−𝑋(𝑡))ⅆ𝑡 operates much like Hooke’s law, in that when the price is higher than the ‘equilibrium’ level this term will pull it back down to the mean at the rate of 𝛼. If price is lower than the ‘equilibrium’ level this term will push it back up to the mean at the rate of 𝛼. Stochastic – “The term stochastic occurs in a wide variety of professional or academic fields to describe events or systems that are unpredictable due to the influence of a random variable.“ per Wikipedia. Effectively that is to say that the indeterminate part of the equation is ‘accounted’ for in the stochastic term.

Stochastic Approximation  

Stochastic Approximation  

Stochastic Approximation   Directional Derivatve: http://math.oregonstate.edu/home/programs/undergrad/CalculusQuestStudyGuides/vcalc/grad/grad.html https://en.wikipedia.org/wiki/Directional_derivative

Stochastic Approximation   Bias is calculated as the difference between a central difference approximation and the actual derivative at the point of the objective function. Central Difference Approximation: https://en.wikipedia.org/wiki/Finite_difference

Table of Contents Parallelization Review Search Algorithm Project Results

3. Parallelization Recursive Refinement Search

Equation Level Parallelism   λ_𝑛 is meant to deal with uncorrelated noise, like inaccuracy of price quote, selling storm, incomplete information (less than Nyquist frequency for sampling speed). η_𝑛 is meant to deal with correlated noise, sell off in stock, quoting a volatile price, differences in price on different stock exchanges. 𝛿_𝑛 is constant and usually chosen as O(1/(n^(1/6))

Equation Level Parallelism Equations are ‘auto’ parallelized with Parallelize command. Mathematica will split the expression parts into sub programs and distribute.

Question Level Parallelism What is the best stock from a set of stocks S over time period P. S = set of stock symbols, ie {“MSFT”, “AAPL”, “NFLX”, “CVX”, “AMZN”} P = set of 2 dates, start and end, ie {“1 Jan 2015”, “13 Nov 2015”} Allows for running all symbols independently of each other, then ‘combining’ results. Done via ParallelSubmit on stock symbols. Can be done via ParallelSubmit with a function to generate the sets for testing https://reference.wolfram.com/language/guide/ParallelComputing.html

Question Level Parallelism What is the time period for stock S with in limited time period P. S = stock symbol, ie {“MSFT”} P = set of 2 dates, start search and end search, ie {“1 Jan 2015”, “13 Nov 2015”} Allows for processing a single set of data, with multiple concurrent search threads. ParallelSubmit with function to generate testing sets. Can be done via ParallelSubmit with a function to generate the sets for testing https://reference.wolfram.com/language/guide/ParallelComputing.html

Table of Contents Project Results Review Search Algorithm Parallelization Project Results

4. Project Results Sample Results

Sample Results – Time Period Best stock period for each: {“MSFT”, “AAPL”, “NFLX”, “CVX”, “AMZN”} Time Period: Jul 2014 – Oct 2015 – Microsoft (MSFT) Buy + Sell sets: 3 times of 233 shares. Buy: $42.86 Sell: $48.68 Profit Per Share: $17.46 ($5.82) $10,000 @Jul 2014 becomes $14,068.18 @Oct 2015 – ~41% gain Total Value calculated by getting the whole number of shares at original price for $10,000. Multiplying that by the profits per share, and times the number of buy/sell sets. This does not include reinvesting profits gained during the period, just the original $10,000 worth of shares.

Sample Results – Time Period 2 Best stock period for each: {“MSFT”, “AAPL”, “NFLX”, “CVX”, “AMZN”} Time Period: Feb 2011 – Jul 2012 – Apple (AAPL) Buy + Sell sets: 3 times of 132 shares. Buy: $75.60 Sell: $90.53 Profit Per Share: $44.79 ($14.93) $10,000 @Feb 2011 becomes $15,912.28 @Jul 2012 – ~60% gain Total Value calculated by getting the whole number of shares at original price for $10,000. Multiplying that by the profits per share, and times the number of buy/sell sets. This does not include reinvesting profits gained during the period, just the original $10,000 worth of shares.

Sample Results – Time Period 3 Best stock period for each: {“MSFT”, “AAPL”, “NFLX”, “CVX”, “AMZN”} Time Period: Sep 2013 – Jan 2015 – Netflix (NFLX) Buy + Sell sets: 3 times of 33 shares. Buy: $297.90 Sell: $346.20 Profit Per Share: $144.9 ($48.3) $10,000 @Sep 2013 becomes $14,781.7 @Jan 2015 – ~48% gain Total Value calculated by getting the whole number of shares at original price for $10,000. Multiplying that by the profits per share, and times the number of buy/sell sets. This does not include reinvesting profits gained during the period, just the original $10,000 worth of shares.

Sample Results – Time Period 4 Best stock period for each: {“MSFT”, “AAPL”, “NFLX”, “CVX”, “AMZN”} Time Period: Nov 2011 – Jul 2012 - Chevron (CVX) Buy + Sell sets: 5 times of 101 shares. Buy: $98.72 Sell: $108.30 Profit per Share: $47.9 ($9.58) $10,000 @Nov 2011 becomes $14,837.9 @Jul 2012 – 48% gain Total Value calculated by getting the whole number of shares at original price for $10,000. Multiplying that by the profits per share, and times the number of buy/sell sets. This does not include reinvesting profits gained during the period, just the original $10,000 worth of shares.

Sample Results – Time Period 5 Best stock period for each: {“MSFT”, “AAPL”, “NFLX”, “CVX”, “AMZN”} Time Period: Sep 2013 – Jan 2015 – Amazon (AMZN) Buy + Sell sets: 3 times of 33 shares. Buy: $297.90 Sell: $346.20 Profit Per Share: $144.9 ($48.3) $10,000 @Sep 2013 becomes $14,781.7 @Jan 2015 – ~48% gain Total Value calculated by getting the whole number of shares at original price for $10,000. Multiplying that by the profits per share, and times the number of buy/sell sets. This does not include reinvesting profits gained during the period, just the original $10,000 worth of shares.

Sample Results – Best Stock in Period Best stock of: {“MSFT”, “AAPL”, “NFLX”, “CVX”, “AMZN”} Time Period: Nov 2010 – Nov 2015 – Apple (AAPL) Buy + Sell sets: 3 times of 132 shares. Buy: $75.60 Sell: $90.53 Profit Per Share: $44.79 ($14.93) $10,000 @Feb 2011 becomes $15,912.28 @Jul 2012 – ~60% gain Total Value calculated by getting the whole number of shares at original price for $10,000. Multiplying that by the profits per share, and times the number of buy/sell sets. This does not include reinvesting profits gained during the period, just the original $10,000 worth of shares.

Specific Questions to be Answered 1 Data Sample Related Does the algorithm work when there is a macroscopic change in the overall market? No. Some sort of capital preservation or opportunity cost maximum needs to be used. Does changing the training & applying time windows affect the return? How much? Do longer windows fair better or shorter ones? A) Yes. B) Depends. C) Inconclusive. Are there any dependable seasonal fluctuations? Inconclusive. Does the asset ‘class’ affect the effectiveness of the algorithm? Yes, most stocks are NOT mean reverting.

Specific Questions to be Answered 2 Performance Related How fast can the Xeon server crunch the numbers? How fast can the Hydra server crunch the numbers? Is there a better way to format the data than the default JSON format? Given the use of common mathematical operations, could they be switched out to a format that uses matrix multiplication?