Optimal Market Making is the problem of dynamically adjusting bid and ask prices/sizes on the Limit Order Book so as to maximize Expected Utility of Gains. This is a stochastic control problem that can be tackled with classical Dynamic Programming techniques or with Reinforcement Learning (using a market-learnt simulator)
"Quantitative Trading as a Mathematical Science" by Dr. Haksun Li, Founder an...Quantopian
Presented at QuantCon Singapore 2016, Quantopian's quantitative finance and algorithmic trading conference, November 11th.
Quantitative trading is distinguishable from other trading methodologies like technical analysis and analysts’ opinions because it uniquely provides justifications to trading strategies using mathematical reasoning. Put differently, quantitative trading is a science that trading strategies are proven statistically profitable or even optimal under certain assumptions. There are properties about strategies that we can deduce before betting the first $1, such as P&L distribution and risks. There are exact explanations to the success and failure of strategies, such as choice of parameters. There are ways to iteratively improve strategies based on experiences of live trading, such as making more realistic assumptions. These are all made possible only in quantitative trading because we have assumptions, models and rigorous mathematical analysis.
Quantitative trading has proved itself to be a significant driver of mathematical innovations, especially in the areas of stochastic analysis and PDE-theory. For instances, we can compute the optimal timings to follow the market by solving a pair of coupled Hamilton–Jacobi–Bellman equations; we can construct sparse mean reverting baskets by solving semi-definite optimization problems with cardinality constraints and can optimally trade these baskets by solving stochastic control problems; we can identify statistical arbitrage opportunities by analyzing the volatility process of a stochastic asset at different frequencies; we can compute the optimal placements of market and limit orders by solving combined singular and impulse control problems which leads to novel and difficult to solve quasi-variational inequalities.
"Deep Q-Learning for Trading" by Dr. Tucker Balch, Professor of Interactive C...Quantopian
Reinforcement Learning (RL) has been around for a long time, but it has not attracted much attention over the last decade. Until, that is, a group of Google researchers showed how RL can be used to train a computer to play video games at far above human capabilities.
Besides video games, the RL problem is also well aligned to solve trading problems as well (e.g., work by Dr. Michael Kearns). In this talk, Tucker will provide a gentle introduction to Q-Learning, one of the leading RL methods.
He will also show how Q-Learning can be integrated with artificial neural network learners and how such a system can be used to learn and execute a trading strategy. This is joint work with David Byrd at Georgia Tech.
"Portfolio Optimisation When You Don’t Know the Future (or the Past)" by Rob...Quantopian
We generally assume the past is a good guide to the future, but well do we even know the past? What effect does this uncertainty when estimating inputs have on the notoriously unstable algorithms for portfolio optimization?
I explore this issue, look at some commonly used solutions, and also introduce some alternative methods.
"From Alpha Discovery to Portfolio Construction: Pitfalls and Solutions" by D...Quantopian
From QuantCon 2017: Implementation is the efficient translation of alpha research into portfolios. It includes portfolio construction and trading. It is a vital step in the quant equity workflow, as poor implementation can ruin even the best alpha ideas. Two crucial challenges must be solved: how to construct a portfolio that most efficiently captures a given alpha signal; and, in the presence of multiple signals, how to optimally combine them into a single composite alpha factor.
This talk addresses these challenges, examines common pitfalls in the implementation of quantitative strategies and good practices to avoid them. A common theme is striking the right balance between factor signal purity and investability. We look at how factor models and optimisation techniques help professional investors answer three key questions:
· What risks should your risk model be cognisant of?
· What objective function should you use?
· What effect do investability constraints have on your portfolio?
Backtesting And Live Trading With Interactive Brokers Using Python With Dr. H...QuantInsti
For the Webinar video, you can also visit: https://blog.quantinsti.com/ibridgepy-webinar-14-november-2019/
-----------------------------------------
Session Outline:
- IBridgePy installation
- A simple algorithmic trading strategy, daily close reverse
- Go through the code and basic functions used in this strategy
- Backtest strategy using historical data from IB in IBridgePy
- Backtest strategy using historical data from local csv file
- How to live trade a strategy
- Place orders to multiple accounts
- Analyze trading results from a strategy
Speaker Profile:
Dr. Hui Liu - Faculty, Executive Programme in Algorithmic Trading by QuantInsti
He is the author of IBridgePy (open-sourced software to trade with Interactive Brokers) and founder of Running River Investment LLC. His major trading interests are US equities and Forex market. Running River Investment LLC is a private hedge fund specialized in the development of automated trading strategies using Python.
He obtained his bachelor degree and master degree in materials science and engineering from Tsinghua University, China and Ph.D from University of Virginia, U.S.A. His MBA was from Indiana University, U.S.A and his study interest at Indiana was quantitative analysis.
-----------------------------------------
For the Webinar video, you can also visit: https://blog.quantinsti.com/ibridgepy-webinar-14-november-2019/
-----------------------------------------
Learn more about our EPAT® course here: https://www.quantinsti.com/epat/
OR Visit us at: https://www.quantinsti.com/
Like and Follow us on:
Facebook: https://www.facebook.com/quantinsti/
LinkedIn: https://www.linkedin.com/company/quantinsti
Twitter: https://twitter.com/QuantInsti
QuantConnect - Introduction to Pairs TradingQuantConnect
Introduction to pairs trading on the QuantConnect platform. Webinar provided by Interactive Brokers. Learn the fundamentals of pairs trading in a non-technical manner. Using the research environment we'll investigate XOM and CVX for cointegration; and then backtest them in QuantConnect.
"Quantitative Trading as a Mathematical Science" by Dr. Haksun Li, Founder an...Quantopian
Presented at QuantCon Singapore 2016, Quantopian's quantitative finance and algorithmic trading conference, November 11th.
Quantitative trading is distinguishable from other trading methodologies like technical analysis and analysts’ opinions because it uniquely provides justifications to trading strategies using mathematical reasoning. Put differently, quantitative trading is a science that trading strategies are proven statistically profitable or even optimal under certain assumptions. There are properties about strategies that we can deduce before betting the first $1, such as P&L distribution and risks. There are exact explanations to the success and failure of strategies, such as choice of parameters. There are ways to iteratively improve strategies based on experiences of live trading, such as making more realistic assumptions. These are all made possible only in quantitative trading because we have assumptions, models and rigorous mathematical analysis.
Quantitative trading has proved itself to be a significant driver of mathematical innovations, especially in the areas of stochastic analysis and PDE-theory. For instances, we can compute the optimal timings to follow the market by solving a pair of coupled Hamilton–Jacobi–Bellman equations; we can construct sparse mean reverting baskets by solving semi-definite optimization problems with cardinality constraints and can optimally trade these baskets by solving stochastic control problems; we can identify statistical arbitrage opportunities by analyzing the volatility process of a stochastic asset at different frequencies; we can compute the optimal placements of market and limit orders by solving combined singular and impulse control problems which leads to novel and difficult to solve quasi-variational inequalities.
"Deep Q-Learning for Trading" by Dr. Tucker Balch, Professor of Interactive C...Quantopian
Reinforcement Learning (RL) has been around for a long time, but it has not attracted much attention over the last decade. Until, that is, a group of Google researchers showed how RL can be used to train a computer to play video games at far above human capabilities.
Besides video games, the RL problem is also well aligned to solve trading problems as well (e.g., work by Dr. Michael Kearns). In this talk, Tucker will provide a gentle introduction to Q-Learning, one of the leading RL methods.
He will also show how Q-Learning can be integrated with artificial neural network learners and how such a system can be used to learn and execute a trading strategy. This is joint work with David Byrd at Georgia Tech.
"Portfolio Optimisation When You Don’t Know the Future (or the Past)" by Rob...Quantopian
We generally assume the past is a good guide to the future, but well do we even know the past? What effect does this uncertainty when estimating inputs have on the notoriously unstable algorithms for portfolio optimization?
I explore this issue, look at some commonly used solutions, and also introduce some alternative methods.
"From Alpha Discovery to Portfolio Construction: Pitfalls and Solutions" by D...Quantopian
From QuantCon 2017: Implementation is the efficient translation of alpha research into portfolios. It includes portfolio construction and trading. It is a vital step in the quant equity workflow, as poor implementation can ruin even the best alpha ideas. Two crucial challenges must be solved: how to construct a portfolio that most efficiently captures a given alpha signal; and, in the presence of multiple signals, how to optimally combine them into a single composite alpha factor.
This talk addresses these challenges, examines common pitfalls in the implementation of quantitative strategies and good practices to avoid them. A common theme is striking the right balance between factor signal purity and investability. We look at how factor models and optimisation techniques help professional investors answer three key questions:
· What risks should your risk model be cognisant of?
· What objective function should you use?
· What effect do investability constraints have on your portfolio?
Backtesting And Live Trading With Interactive Brokers Using Python With Dr. H...QuantInsti
For the Webinar video, you can also visit: https://blog.quantinsti.com/ibridgepy-webinar-14-november-2019/
-----------------------------------------
Session Outline:
- IBridgePy installation
- A simple algorithmic trading strategy, daily close reverse
- Go through the code and basic functions used in this strategy
- Backtest strategy using historical data from IB in IBridgePy
- Backtest strategy using historical data from local csv file
- How to live trade a strategy
- Place orders to multiple accounts
- Analyze trading results from a strategy
Speaker Profile:
Dr. Hui Liu - Faculty, Executive Programme in Algorithmic Trading by QuantInsti
He is the author of IBridgePy (open-sourced software to trade with Interactive Brokers) and founder of Running River Investment LLC. His major trading interests are US equities and Forex market. Running River Investment LLC is a private hedge fund specialized in the development of automated trading strategies using Python.
He obtained his bachelor degree and master degree in materials science and engineering from Tsinghua University, China and Ph.D from University of Virginia, U.S.A. His MBA was from Indiana University, U.S.A and his study interest at Indiana was quantitative analysis.
-----------------------------------------
For the Webinar video, you can also visit: https://blog.quantinsti.com/ibridgepy-webinar-14-november-2019/
-----------------------------------------
Learn more about our EPAT® course here: https://www.quantinsti.com/epat/
OR Visit us at: https://www.quantinsti.com/
Like and Follow us on:
Facebook: https://www.facebook.com/quantinsti/
LinkedIn: https://www.linkedin.com/company/quantinsti
Twitter: https://twitter.com/QuantInsti
QuantConnect - Introduction to Pairs TradingQuantConnect
Introduction to pairs trading on the QuantConnect platform. Webinar provided by Interactive Brokers. Learn the fundamentals of pairs trading in a non-technical manner. Using the research environment we'll investigate XOM and CVX for cointegration; and then backtest them in QuantConnect.
Beware of Low Frequency Data by Ernie Chan, Managing Member, QTS Capital Mana...Quantopian
It is commonly believed that low frequency strategies require only low frequency data for backtesting. We will show that using low frequency data can lead to dangerously inflated backtest results even for low frequency strategies. Examples will be drawn from a closed end fund strategy, a long-short stock strategy, and a futures strategy.
This presentation was part of the QuantCon 2015 Conference hosted by Quantopian. Visit us at: www.quantopian.com.
"Active Learning in Trading Algorithms" by David Fellah, Head of the EMEA Lin...Quantopian
Presented at QuantCon Singapore 2016, Quantopian's quantitative finance and algorithmic trading conference, November 11th.
Institutional orders generally exceed the absorption capacity in the immediate order book and are frequently split horizontally over time and vertically over price. The task of splitting apart a meta-order is achieved through a sequence of market transactions performed by trading algorithms, causing market impact. Consequently a great deal of research is spent on understanding market impact and its role in algorithm design in order to reduce it.
In this presentation, we discuss an application of Deep Reinforcement Learning to minimise transaction costs across a diverse range of instruments. We first discuss high-frequency market impact and its role in optimal planning for single-position and portfolio trading. We then discuss examples of how machine learning is used in short-term forecasting to augment order placement decisions.
Finally, we discuss how the algorithm considers these effects jointly, how it optimizes a dynamic policy, and how it improves performance against surrogate hand-tuned algorithms.
"Enhancing Statistical Significance of Backtests" by Dr. Ernest Chan, Managin...Quantopian
Insufficient historical data is a major hurdle in building a trading model free from data snooping bias. Dr. Chan's talk will discuss several techniques, some borrowed from machine learning, that can alleviate overfitting and enhance the statistical significance of a backtest.
"A Framework-Based Approach to Building Quantitative Trading Systems" by Dr. ...Quantopian
Contrary to popular wisdom the difference between a retail quant trader and a professional portfolio manager is not in "having better trade entry and exit rules". Rather it is the difference in how each approaches the concepts of portfolio optimisation and risk management.
Both of these topics are synonymous with heavy math, which can be off-putting for beginner retail systematic traders. Hence, it can be extremely daunting for those without institutional experience to know how to turn a set of trading rules into a robust portfolio and risk management system.
In this talk, Mike will discuss how to take a typical retail quant strategy and place it in a professional quantitative trading framework, with proper position sizing and risk assessment, without resorting to pages of formulas or the need to have a PhD in statistics!
Dossier de veille sur la veille m2 revi 2017 - PoledocumentationPoleDocumentation.fr
Durant l'une de mes interventions à l'Université, au cours du 1er semestre 2016-2017, j'ai fait travailler les étudiants du Master 2 Recherche et Veille Internationale sur la création d'un dossier de veille pour les débutants.
L'idée est de présenter, aux veilleurs débutants (et aux prochaines promotions d'étudiants de ce Master), ce qu'est la veille, la démarche de veille, les personnes qui "font" la veille, etc.
An introduction to implementing 5 basic quant strategies on Quantopian. Presented to the Bay Area Algorithmic Trading Group and the Bay Area Trading Signals meetup groups at the Hacker Dojo Feb 6th, 2014 by Jess Stauth
We carry out a study to evaluate and compare the relative performance of the distance and mixed copula pairs trading strategies. Using data from the S&P 500 stocks from 1990 to 2015, we find that the mixed copula strategy is able to generate a higher mean excess return than the traditional distance method under different weighting structures when the number of tradeable signals is equiparable. Particularly, the mixed copula and distance methods show a mean annualized value-weighted excess returns after costs on committed and fully invested capital as high as 3.98% and 3.14% and 12.73% and 6.07%, respectively, with annual Sharpe ratios up to 0.88. The mixed copula strategy shows positive and significant alphas during the sample period after accounting for various risk-factors. We also provide some evidence on the performance of the strategies over different market states.
Should You Build Your Own Backtester? by Michael Halls-Moore at QuantCon 2016Quantopian
The huge uptake of Python and R as first-class programming languages within quantitative trading has lead to an abundance of backtesting libraries becoming widely available. It can take months, if not years, to develop a robust backtesting and trading infrastructure from scratch and many of the vendors (both commercial and open source) have a huge head start. Given such prevalence and maturity of the available software, as well as the time investment needed for development, is there any benefit to building your own?
In this talk, Mike will argue the advantages and disadvantages of building your own infrastructure, how to develop and improve your first backtesting system and how to make it robust to internal and external risk events. The talk will be of interest whether you are a retail quant trader managing your own capital or are forming a start-up quant fund with initial seed funding.
Online Learning Startegy of MArket MAking.pdfGal Zahavi
This Study is aimed to establish an analytical foundation for electronic market making strategy, by giving a probabilistic interpretation to the Bid-Ask spread. The suggested strategy will be optimized with on-line learning from the high frequency data of the TASE (Tel Aviv Stock Exchange) order book.
"Fundamental Forecasts: Methods and Timing" by Vinesh Jha, CEO of ExtractAlphaQuantopian
From QuantCon 2017:
Fundamental and quantitative stock selection research has long focused on creating accurate forecasts of company fundamentals such as earnings and revenues. In this talk we examine why fundamental forecasts are powerful and survey some classic methods for generating these forecasts. Next we explore some newer methodologies which can be effective in generating more accurate fundamental forecasts, including new uses of traditional data as well as novel crowdsourced and online behavior databases. Finally, we present new research examining the temporal variation in efficacy of these forecasts with an eye towards understanding the market conditions in which an accurate fundamental forecast can be more or less profitable.
Algorithmic trading and Machine Learning by Michael Kearns, Professor of Comp...Quantopian
Traditional financial markets have undergone rapid technological change due to increased automation and the introduction of new exchanges and mechanisms. Such changes have brought with them challenging new problems in algorithmic trading, many of which invite a machine learning approach. In this talk, Michael will examine several algorithmic trading problems, focusing on their novel ML aspects, including limiting market impact, dealing with censored data, and incorporating risk considerations.
This presentation was part of QuantCon 2015 hosted by Quantopian. Visit us at: www.quantopian.com.
1. THE BEST STRATEGIES THAT CAN BE USED WHEN TRADING
2. THE CANDLES GETTING SMALLER AND SMALLER AS APPROACH THE SUPPORT OR RESISTANCE
• THE CANDLES GETTING SMALLER AND SMALLER AS APPROACH THE SUPPORT OR RESISTANCE
• WHEN THE CANDLES GETTING SMALLER AND SMALLER ALONG with THE TREND AND THE LAST CANDLES IS THE LONG WICK CANDLES, IT MEANS THE PRICE POSSIBLY GOING REVERSAL
3. THE CANDLES GETTING SMALLER AND SMALLER AS APPROACH THE SUPPORT OR RESISTANCE
• THE CANDLES GETTING SMALLER AND SMALLER AS APPROACH THE SUPPORT OR RESISTANCE
• WHEN THE CANDLES GETTING SMALLER AND SMALLER ALONG, with THE TREND, IT MEANS THE PRICE POSSIBLY GOING REVERSAL.
4. BULLISH CANDLES STICK ( BULLISH ENGULFING) AND BEARISH CANDLESTICK ( BEARISH ENGULFING)
• ALL THE GREEN CANDLES ALONG THE UPTREND
• THE CANDLES COLOUR CHANGES AT THE SUPPORT OR RESISTANCE LEVEL
• GREEN CANDLES MEANS THE BULLISH PRICE ACTION
• THREE GREEN CANDLES ALONG THE UPTREND, THEN NEXT CANDLES BECOME RED CANDLES AND THE RED CANDLES APPEAR AT THE RESISTANCE
5. ALL THE GREEN CANDLES ALONG THE UPTREND
• THE CANDLES COLOUR CHANGES AT THE SUPPORT OR RESISTANCE LEVEL
• RED CANDLES MEANS THE BEARISH PRICE ACTION
• RED CANDLES ALONG THE DOWNTREND, THEN NEXT CANDLES BECOME GREEN CANDLES AND THE RED CANDLES APPEAR AT THE SUPPORT
6. CANDLES PATTERN THAT WORK IN TRADING
• LONG WICK CANDLES
• INSIDE BAR CANDLES
• MOMENTUM CANDLES
• MULTIPLE CANDLES REJECTION
7. LONG WICK CANDLE
• THE LONG WICK CANDLE IN THE PICTURE REPRESENTS THE SELLERS TRIES TO PUSH THE PRICE DOWN BUT FAILED, SO THE WICK TO STICK OUT.
• AS YOU CAN SEE IN THE PICTURE, IN THE DOWNTREND, THERE HAS THREE RED CANDLES, THEREFORE ONE GREEN CANDLES AND THE GREEN CANDLES REPRESENT THE LONG WICK CANDLES, SO MEANS THE PRICE ACTION GOING REVERSAL.
8. INSIDE BAR CANDLES
• THE HIGH AND LOW OF THE CANDLES IS INSIDE THE HIGH AND LOW OF PREVIOUS CANDLES
• MEANS MOMENTUM LOSS OCCURRING
• AS THE PICTURE BESIDES, SHOW THE PRICE ACTION FAILED TO MAKE HIGHER HIGH
• MEANS THE PRICE ACTION GOING REVERSAL
9. MOMENTUM CANDLES
• THE CANDLE BODY IS BIGGER THAN THE PREVIOUS CANDLE BODY.
• MORE CONFIRMATION FOR THE MARKET
• THE MOMENTUM CANDLES IN THE PICTURE BESIDES SHOW THE MORE CONFIRMATION THE MARKET IS GOING DOWNWARD TREND
10. MULTIPLE CANDLES REJECTION
• MORE THAN ONE CANDLES REJECT THE KEY LEVEL
• SHOW THAT PRICE TRIED OVER AGAIN AND AGAIN TO PUSH TO THE LEVEL BUT FAILED
11. STACK CANDLESTICK PATTERNS TOGETHER
• DIFFERENT CANDLES PATTERNS TOGETHER
• AS THE PICTURE SHOWS HAS THREE DIFFERENT CANDLESTICK PATTERNS, WHICH ARE INSIDE BAR, MOMENTUM AND CANDLES GETTING SMALLER AND SMALLER ALONG THE UPTREND.
12. THANK YOU
Combining the Best Stock Selection Factors by Patrick O'Shaughnessy at QuantC...Quantopian
Patrick will explore how to combine the value factor with other stock selection factors to build a superior stock selection strategy. He will discuss unique ways of using momentum, share buybacks, and quality factors to improve on a simple value screen. He will discuss portfolio concentration, rebalancing, and risk management. He will also explain why the best versions of these strategies are only possible for smaller firms and investors.
Dual Momentum Investing by Gary Antonacci QuantCon 2016Quantopian
Gary will begin by reviewing the most common investment vehicles throughout history while explaining their advantages and disadvantages. He will then show how momentum can help accentuate the positives and eliminate the negatives. Using easily understood examples and historical research findings, Gary will show how relative strength momentum can enhance investment return, while trend-following absolute momentum can dramatically decrease bear market exposure. Finally, Gary will show how you can implement and easily maintain your very own dual momentum portfolio using the best assets classes.
Beware of Low Frequency Data by Ernie Chan, Managing Member, QTS Capital Mana...Quantopian
It is commonly believed that low frequency strategies require only low frequency data for backtesting. We will show that using low frequency data can lead to dangerously inflated backtest results even for low frequency strategies. Examples will be drawn from a closed end fund strategy, a long-short stock strategy, and a futures strategy.
This presentation was part of the QuantCon 2015 Conference hosted by Quantopian. Visit us at: www.quantopian.com.
"Active Learning in Trading Algorithms" by David Fellah, Head of the EMEA Lin...Quantopian
Presented at QuantCon Singapore 2016, Quantopian's quantitative finance and algorithmic trading conference, November 11th.
Institutional orders generally exceed the absorption capacity in the immediate order book and are frequently split horizontally over time and vertically over price. The task of splitting apart a meta-order is achieved through a sequence of market transactions performed by trading algorithms, causing market impact. Consequently a great deal of research is spent on understanding market impact and its role in algorithm design in order to reduce it.
In this presentation, we discuss an application of Deep Reinforcement Learning to minimise transaction costs across a diverse range of instruments. We first discuss high-frequency market impact and its role in optimal planning for single-position and portfolio trading. We then discuss examples of how machine learning is used in short-term forecasting to augment order placement decisions.
Finally, we discuss how the algorithm considers these effects jointly, how it optimizes a dynamic policy, and how it improves performance against surrogate hand-tuned algorithms.
"Enhancing Statistical Significance of Backtests" by Dr. Ernest Chan, Managin...Quantopian
Insufficient historical data is a major hurdle in building a trading model free from data snooping bias. Dr. Chan's talk will discuss several techniques, some borrowed from machine learning, that can alleviate overfitting and enhance the statistical significance of a backtest.
"A Framework-Based Approach to Building Quantitative Trading Systems" by Dr. ...Quantopian
Contrary to popular wisdom the difference between a retail quant trader and a professional portfolio manager is not in "having better trade entry and exit rules". Rather it is the difference in how each approaches the concepts of portfolio optimisation and risk management.
Both of these topics are synonymous with heavy math, which can be off-putting for beginner retail systematic traders. Hence, it can be extremely daunting for those without institutional experience to know how to turn a set of trading rules into a robust portfolio and risk management system.
In this talk, Mike will discuss how to take a typical retail quant strategy and place it in a professional quantitative trading framework, with proper position sizing and risk assessment, without resorting to pages of formulas or the need to have a PhD in statistics!
Dossier de veille sur la veille m2 revi 2017 - PoledocumentationPoleDocumentation.fr
Durant l'une de mes interventions à l'Université, au cours du 1er semestre 2016-2017, j'ai fait travailler les étudiants du Master 2 Recherche et Veille Internationale sur la création d'un dossier de veille pour les débutants.
L'idée est de présenter, aux veilleurs débutants (et aux prochaines promotions d'étudiants de ce Master), ce qu'est la veille, la démarche de veille, les personnes qui "font" la veille, etc.
An introduction to implementing 5 basic quant strategies on Quantopian. Presented to the Bay Area Algorithmic Trading Group and the Bay Area Trading Signals meetup groups at the Hacker Dojo Feb 6th, 2014 by Jess Stauth
We carry out a study to evaluate and compare the relative performance of the distance and mixed copula pairs trading strategies. Using data from the S&P 500 stocks from 1990 to 2015, we find that the mixed copula strategy is able to generate a higher mean excess return than the traditional distance method under different weighting structures when the number of tradeable signals is equiparable. Particularly, the mixed copula and distance methods show a mean annualized value-weighted excess returns after costs on committed and fully invested capital as high as 3.98% and 3.14% and 12.73% and 6.07%, respectively, with annual Sharpe ratios up to 0.88. The mixed copula strategy shows positive and significant alphas during the sample period after accounting for various risk-factors. We also provide some evidence on the performance of the strategies over different market states.
Should You Build Your Own Backtester? by Michael Halls-Moore at QuantCon 2016Quantopian
The huge uptake of Python and R as first-class programming languages within quantitative trading has lead to an abundance of backtesting libraries becoming widely available. It can take months, if not years, to develop a robust backtesting and trading infrastructure from scratch and many of the vendors (both commercial and open source) have a huge head start. Given such prevalence and maturity of the available software, as well as the time investment needed for development, is there any benefit to building your own?
In this talk, Mike will argue the advantages and disadvantages of building your own infrastructure, how to develop and improve your first backtesting system and how to make it robust to internal and external risk events. The talk will be of interest whether you are a retail quant trader managing your own capital or are forming a start-up quant fund with initial seed funding.
Online Learning Startegy of MArket MAking.pdfGal Zahavi
This Study is aimed to establish an analytical foundation for electronic market making strategy, by giving a probabilistic interpretation to the Bid-Ask spread. The suggested strategy will be optimized with on-line learning from the high frequency data of the TASE (Tel Aviv Stock Exchange) order book.
"Fundamental Forecasts: Methods and Timing" by Vinesh Jha, CEO of ExtractAlphaQuantopian
From QuantCon 2017:
Fundamental and quantitative stock selection research has long focused on creating accurate forecasts of company fundamentals such as earnings and revenues. In this talk we examine why fundamental forecasts are powerful and survey some classic methods for generating these forecasts. Next we explore some newer methodologies which can be effective in generating more accurate fundamental forecasts, including new uses of traditional data as well as novel crowdsourced and online behavior databases. Finally, we present new research examining the temporal variation in efficacy of these forecasts with an eye towards understanding the market conditions in which an accurate fundamental forecast can be more or less profitable.
Algorithmic trading and Machine Learning by Michael Kearns, Professor of Comp...Quantopian
Traditional financial markets have undergone rapid technological change due to increased automation and the introduction of new exchanges and mechanisms. Such changes have brought with them challenging new problems in algorithmic trading, many of which invite a machine learning approach. In this talk, Michael will examine several algorithmic trading problems, focusing on their novel ML aspects, including limiting market impact, dealing with censored data, and incorporating risk considerations.
This presentation was part of QuantCon 2015 hosted by Quantopian. Visit us at: www.quantopian.com.
1. THE BEST STRATEGIES THAT CAN BE USED WHEN TRADING
2. THE CANDLES GETTING SMALLER AND SMALLER AS APPROACH THE SUPPORT OR RESISTANCE
• THE CANDLES GETTING SMALLER AND SMALLER AS APPROACH THE SUPPORT OR RESISTANCE
• WHEN THE CANDLES GETTING SMALLER AND SMALLER ALONG with THE TREND AND THE LAST CANDLES IS THE LONG WICK CANDLES, IT MEANS THE PRICE POSSIBLY GOING REVERSAL
3. THE CANDLES GETTING SMALLER AND SMALLER AS APPROACH THE SUPPORT OR RESISTANCE
• THE CANDLES GETTING SMALLER AND SMALLER AS APPROACH THE SUPPORT OR RESISTANCE
• WHEN THE CANDLES GETTING SMALLER AND SMALLER ALONG, with THE TREND, IT MEANS THE PRICE POSSIBLY GOING REVERSAL.
4. BULLISH CANDLES STICK ( BULLISH ENGULFING) AND BEARISH CANDLESTICK ( BEARISH ENGULFING)
• ALL THE GREEN CANDLES ALONG THE UPTREND
• THE CANDLES COLOUR CHANGES AT THE SUPPORT OR RESISTANCE LEVEL
• GREEN CANDLES MEANS THE BULLISH PRICE ACTION
• THREE GREEN CANDLES ALONG THE UPTREND, THEN NEXT CANDLES BECOME RED CANDLES AND THE RED CANDLES APPEAR AT THE RESISTANCE
5. ALL THE GREEN CANDLES ALONG THE UPTREND
• THE CANDLES COLOUR CHANGES AT THE SUPPORT OR RESISTANCE LEVEL
• RED CANDLES MEANS THE BEARISH PRICE ACTION
• RED CANDLES ALONG THE DOWNTREND, THEN NEXT CANDLES BECOME GREEN CANDLES AND THE RED CANDLES APPEAR AT THE SUPPORT
6. CANDLES PATTERN THAT WORK IN TRADING
• LONG WICK CANDLES
• INSIDE BAR CANDLES
• MOMENTUM CANDLES
• MULTIPLE CANDLES REJECTION
7. LONG WICK CANDLE
• THE LONG WICK CANDLE IN THE PICTURE REPRESENTS THE SELLERS TRIES TO PUSH THE PRICE DOWN BUT FAILED, SO THE WICK TO STICK OUT.
• AS YOU CAN SEE IN THE PICTURE, IN THE DOWNTREND, THERE HAS THREE RED CANDLES, THEREFORE ONE GREEN CANDLES AND THE GREEN CANDLES REPRESENT THE LONG WICK CANDLES, SO MEANS THE PRICE ACTION GOING REVERSAL.
8. INSIDE BAR CANDLES
• THE HIGH AND LOW OF THE CANDLES IS INSIDE THE HIGH AND LOW OF PREVIOUS CANDLES
• MEANS MOMENTUM LOSS OCCURRING
• AS THE PICTURE BESIDES, SHOW THE PRICE ACTION FAILED TO MAKE HIGHER HIGH
• MEANS THE PRICE ACTION GOING REVERSAL
9. MOMENTUM CANDLES
• THE CANDLE BODY IS BIGGER THAN THE PREVIOUS CANDLE BODY.
• MORE CONFIRMATION FOR THE MARKET
• THE MOMENTUM CANDLES IN THE PICTURE BESIDES SHOW THE MORE CONFIRMATION THE MARKET IS GOING DOWNWARD TREND
10. MULTIPLE CANDLES REJECTION
• MORE THAN ONE CANDLES REJECT THE KEY LEVEL
• SHOW THAT PRICE TRIED OVER AGAIN AND AGAIN TO PUSH TO THE LEVEL BUT FAILED
11. STACK CANDLESTICK PATTERNS TOGETHER
• DIFFERENT CANDLES PATTERNS TOGETHER
• AS THE PICTURE SHOWS HAS THREE DIFFERENT CANDLESTICK PATTERNS, WHICH ARE INSIDE BAR, MOMENTUM AND CANDLES GETTING SMALLER AND SMALLER ALONG THE UPTREND.
12. THANK YOU
Combining the Best Stock Selection Factors by Patrick O'Shaughnessy at QuantC...Quantopian
Patrick will explore how to combine the value factor with other stock selection factors to build a superior stock selection strategy. He will discuss unique ways of using momentum, share buybacks, and quality factors to improve on a simple value screen. He will discuss portfolio concentration, rebalancing, and risk management. He will also explain why the best versions of these strategies are only possible for smaller firms and investors.
Dual Momentum Investing by Gary Antonacci QuantCon 2016Quantopian
Gary will begin by reviewing the most common investment vehicles throughout history while explaining their advantages and disadvantages. He will then show how momentum can help accentuate the positives and eliminate the negatives. Using easily understood examples and historical research findings, Gary will show how relative strength momentum can enhance investment return, while trend-following absolute momentum can dramatically decrease bear market exposure. Finally, Gary will show how you can implement and easily maintain your very own dual momentum portfolio using the best assets classes.
Pricing average price advertising options when underlying spot market prices ...Bowei Chen
Advertising options have been recently studied as a special type of guaranteed contracts in online advertising, which are an alternative sales mechanism to real-time auctions. An advertising option is a contract which gives its buyer a right but not obligation to enter into transactions to purchase page views or link clicks at one or multiple pre-specified prices in a specific future period. Different from typical guaranteed contracts, the option buyer pays a lower upfront fee but can have greater flexibility and more control of advertising. Many studies on advertising options so far have been restricted to the situations where the option payoff is determined by the underlying spot market price at a specific time point and the price evolution over time is assumed to be continuous. The former leads to a biased calculation of option payoff and the latter is invalid empirically for many online advertising slots. This paper addresses these two limitations by proposing a new advertising option pricing framework. First, the option payoff is calculated based on an average price over a specific future period. Therefore, the option becomes path-dependent. The average price is measured by the power mean, which contains several existing option payoff functions as its special cases. Second, jump-diffusion stochastic models are used to describe the movement of the underlying spot market price, which incorporate several important statistical properties including jumps and spikes, non-normality, and absence of autocorrelations. A general option pricing algorithm is obtained based on Monte Carlo simulation. In addition, an explicit pricing formula is derived for the case when the option payoff is based on the geometric mean. This pricing formula is also a generalized version of several other option pricing models discussed in related studies.
HJB Equation and Merton's Portfolio ProblemAshwin Rao
Deriving the solution to Merton's Portfolio Problem (Optimal Asset Allocation and Consumption) using the elegant formulation of Hamilton-Jacobi-Bellman equation.
In this short notice, we present structure of the perfect hedging. Closed form formulas clarify the fact that Black-Scholes (BS) portfolio which provides perfect hedge only at initial moment. Holding portfolio over a certain period implies additional cash flow, which could not be imbedded in BS pricing scheme, and therefore BS option price cannot be derived without additional cash flow which affects BS option price.
In this short notice, we present structure of the perfect hedging. Closed form formulas clarify the fact that Black-Scholes (BS) portfolio which provides perfect hedge only at initial moment. Holding portfolio over a certain period implies additional cash flow, which could not be imbedded in BS pricing scheme, and therefore BS option price cannot be derived without additional cash flow which affects BS option price.
Default Logics for Plausible Reasoning with Controversial AxiomsRommel Carvalho
Presentation given by Thomas Scharrenbach at the 6th Uncertainty Reasoning for the Semantic Web Workshop at the 9th International Semantic Web Conference in 2010.
Paper: Default Logics for Plausible Reasoning with Controversial Axioms
Abstract: Using a variant of Lehmann's Default Logics and Probabilistic Description Logics we recently presented a framework that invalidates those unwanted inferences that cause concept unsatisfiability without the need to remove explicitly stated axioms. The solutions of this methods were shown to outperform classical ontology repair w.r.t. the number of inferences invalidated. However, conflicts may still exist in the knowledge base and can make reasoning ambiguous. Furthermore, solutions with a minimal number of inferences invalidated do not necessarily minimize the number of conflicts. In this paper we provide an overview over finding solutions that have a minimal number of conflicts while invalidating as few inferences as possible. Specifically, we propose to evaluate solutions w.r.t. the quantity of information they convey by recurring to the notion of entropy and discuss a possible approach towards computing the entropy w.r.t. an ABox.
A dynamic pricing model for unifying programmatic guarantee and real-time bid...Bowei Chen
There are two major ways of selling impressions in display advertising. They are either sold in spot through auction mechanisms or in advance via guaranteed contracts. The former has achieved a significant automation via real-time bidding (RTB); however, the latter is still mainly done over the counter through direct sales. This paper proposes a mathematical model that allocates and prices the future impressions between real-time auctions and guaranteed contracts. Under conventional economic assumptions, our model shows that the two ways can be seamless combined programmatically and the publisher's revenue can be maximized via price discrimination and optimal allocation. We consider advertisers are risk-averse, and they would be willing to purchase guaranteed impressions if the total costs are less than their private values. We also consider that an advertiser's purchase behavior can be affected by both the guaranteed price and the time interval between the purchase time and the impression delivery date. Our solution suggests an optimal percentage of future impressions to sell in advance and provides an explicit formula to calculate at what prices to sell. We find that the optimal guaranteed prices are dynamic and are non-decreasing over time. We evaluate our method with RTB datasets and find that the model adopts different strategies in allocation and pricing according to the level of competition. From the experiments we find that, in a less competitive market, lower prices of the guaranteed contracts will encourage the purchase in advance and the revenue gain is mainly contributed by the increased competition in future RTB. In a highly competitive market, advertisers are more willing to purchase the guaranteed contracts and thus higher prices are expected. The revenue gain is largely contributed by the guaranteed selling.
Stochastic Local Volatility Models: Theory and ImplementationVolatility
1) Hedging and volatility
2) Review of volatility models
3) Local volatility models with jumps and stochastic volatility
4) Calibration using Kolmogorov equations
5) PDE based methods in one dimension
5) PDE based methods in two dimensions
7) Illustrations
Understanding Dynamic Programming through Bellman OperatorsAshwin Rao
Policy Iteration and Value Iteration algorithms are best understood by viewing them from the lens of Bellman Policy Operator and Bellman Optimality Operator
A.I. for Dynamic Decisioning under Uncertainty (for real-world problems in Re...Ashwin Rao
Slides from the Research Seminar talk I gave at Nvidia. The topic was: A.I. for Dynamic Decisioning under Uncertainty (for Real-World problems in Retail and in Financial Trading)
Overview of Stochastic Calculus FoundationsAshwin Rao
This is a quick refresher/overview of Stochastic Calculus Foundations. This assumes you have done a Stochastic Calculus course previously and now want to review/revise the material to prepare for a course that lists Stochastic Calculus as a pre-req. In these 11 slides, I list the key content you must be familiar with within Stochastic Calculus.
Risk-Aversion, Risk-Premium and Utility TheoryAshwin Rao
This lecture helps understand the concepts of Risk-Aversion and Risk-Premium viewed from the lens of Utility Theory. These are foundational economic concepts used widely in Financial applications - Portfolio problems and Pricing problems, to name a couple.
To make Reinforcement Learning Algorithms work in the real-world, one has to get around (what Sutton calls) the "deadly triad": the combination of bootstrapping, function approximation and off-policy evaluation. The first step here is to understand Value Function Vector Space/Geometry and then make one's way into Gradient TD Algorithms (a big breakthrough to overcome the "deadly triad").
Stanford CME 241 - Reinforcement Learning for Stochastic Control Problems in ...Ashwin Rao
I am pleased to introduce a new and exciting course, as part of ICME at Stanford University. I will be teaching CME 241 (Reinforcement Learning for Stochastic Control Problems in Finance) in Winter 2019.
A Quick and Terse Introduction to Efficient Frontier MathematicsAshwin Rao
A Quick and Terse Introduction to Efficient Frontier Mathematics. Only a basic background in Linear Algebra, Probability and Optimization is expected to cover this material and gain a reasonable understanding of this topic within one hour.
Recursive Formulation of Gradient in a Dense Feed-Forward Deep Neural NetworkAshwin Rao
Recursive Formulation of Gradient in a Dense Feed-Forward Deep Neural Network. Derived for a fairly general setting where the supervisory variable has a conditional probability density modeled as an arbitrary Generalized Linear Model's "normal-form" probability density, and whose output layer activation function is the GLM canonical link function.
BYD SWOT Analysis and In-Depth Insights 2024.pptxmikemetalprod
Indepth analysis of the BYD 2024
BYD (Build Your Dreams) is a Chinese automaker and battery manufacturer that has snowballed over the past two decades to become a significant player in electric vehicles and global clean energy technology.
This SWOT analysis examines BYD's strengths, weaknesses, opportunities, and threats as it competes in the fast-changing automotive and energy storage industries.
Founded in 1995 and headquartered in Shenzhen, BYD started as a battery company before expanding into automobiles in the early 2000s.
Initially manufacturing gasoline-powered vehicles, BYD focused on plug-in hybrid and fully electric vehicles, leveraging its expertise in battery technology.
Today, BYD is the world’s largest electric vehicle manufacturer, delivering over 1.2 million electric cars globally. The company also produces electric buses, trucks, forklifts, and rail transit.
On the energy side, BYD is a major supplier of rechargeable batteries for cell phones, laptops, electric vehicles, and energy storage systems.
Introduction to Indian Financial System ()Avanish Goel
The financial system of a country is an important tool for economic development of the country, as it helps in creation of wealth by linking savings with investments.
It facilitates the flow of funds form the households (savers) to business firms (investors) to aid in wealth creation and development of both the parties
The secret way to sell pi coins effortlessly.DOT TECH
Well as we all know pi isn't launched yet. But you can still sell your pi coins effortlessly because some whales in China are interested in holding massive pi coins. And they are willing to pay good money for it. If you are interested in selling I will leave a contact for you. Just telegram this number below. I sold about 3000 pi coins to him and he paid me immediately.
Telegram: @Pi_vendor_247
How to get verified on Coinbase Account?_.docxBuy bitget
t's important to note that buying verified Coinbase accounts is not recommended and may violate Coinbase's terms of service. Instead of searching to "buy verified Coinbase accounts," follow the proper steps to verify your own account to ensure compliance and security.
The Evolution of Non-Banking Financial Companies (NBFCs) in India: Challenges...beulahfernandes8
Role in Financial System
NBFCs are critical in bridging the financial inclusion gap.
They provide specialized financial services that cater to segments often neglected by traditional banks.
Economic Impact
NBFCs contribute significantly to India's GDP.
They support sectors like micro, small, and medium enterprises (MSMEs), housing finance, and personal loans.
Poonawalla Fincorp and IndusInd Bank Introduce New Co-Branded Credit Cardnickysharmasucks
The unveiling of the IndusInd Bank Poonawalla Fincorp eLITE RuPay Platinum Credit Card marks a notable milestone in the Indian financial landscape, showcasing a successful partnership between two leading institutions, Poonawalla Fincorp and IndusInd Bank. This co-branded credit card not only offers users a plethora of benefits but also reflects a commitment to innovation and adaptation. With a focus on providing value-driven and customer-centric solutions, this launch represents more than just a new product—it signifies a step towards redefining the banking experience for millions. Promising convenience, rewards, and a touch of luxury in everyday financial transactions, this collaboration aims to cater to the evolving needs of customers and set new standards in the industry.
how to sell pi coins in all Africa Countries.DOT TECH
Yes. You can sell your pi network for other cryptocurrencies like Bitcoin, usdt , Ethereum and other currencies And this is done easily with the help from a pi merchant.
What is a pi merchant ?
Since pi is not launched yet in any exchange. The only way you can sell right now is through merchants.
A verified Pi merchant is someone who buys pi network coins from miners and resell them to investors looking forward to hold massive quantities of pi coins before mainnet launch in 2026.
I will leave the telegram contact of my personal pi merchant to trade with.
@Pi_vendor_247
Falcon stands out as a top-tier P2P Invoice Discounting platform in India, bridging esteemed blue-chip companies and eager investors. Our goal is to transform the investment landscape in India by establishing a comprehensive destination for borrowers and investors with diverse profiles and needs, all while minimizing risk. What sets Falcon apart is the elimination of intermediaries such as commercial banks and depository institutions, allowing investors to enjoy higher yields.
what is the future of Pi Network currency.DOT TECH
The future of the Pi cryptocurrency is uncertain, and its success will depend on several factors. Pi is a relatively new cryptocurrency that aims to be user-friendly and accessible to a wide audience. Here are a few key considerations for its future:
Message: @Pi_vendor_247 on telegram if u want to sell PI COINS.
1. Mainnet Launch: As of my last knowledge update in January 2022, Pi was still in the testnet phase. Its success will depend on a successful transition to a mainnet, where actual transactions can take place.
2. User Adoption: Pi's success will be closely tied to user adoption. The more users who join the network and actively participate, the stronger the ecosystem can become.
3. Utility and Use Cases: For a cryptocurrency to thrive, it must offer utility and practical use cases. The Pi team has talked about various applications, including peer-to-peer transactions, smart contracts, and more. The development and implementation of these features will be essential.
4. Regulatory Environment: The regulatory environment for cryptocurrencies is evolving globally. How Pi navigates and complies with regulations in various jurisdictions will significantly impact its future.
5. Technology Development: The Pi network must continue to develop and improve its technology, security, and scalability to compete with established cryptocurrencies.
6. Community Engagement: The Pi community plays a critical role in its future. Engaged users can help build trust and grow the network.
7. Monetization and Sustainability: The Pi team's monetization strategy, such as fees, partnerships, or other revenue sources, will affect its long-term sustainability.
It's essential to approach Pi or any new cryptocurrency with caution and conduct due diligence. Cryptocurrency investments involve risks, and potential rewards can be uncertain. The success and future of Pi will depend on the collective efforts of its team, community, and the broader cryptocurrency market dynamics. It's advisable to stay updated on Pi's development and follow any updates from the official Pi Network website or announcements from the team.
when will pi network coin be available on crypto exchange.DOT TECH
There is no set date for when Pi coins will enter the market.
However, the developers are working hard to get them released as soon as possible.
Once they are available, users will be able to exchange other cryptocurrencies for Pi coins on designated exchanges.
But for now the only way to sell your pi coins is through verified pi vendor.
Here is the telegram contact of my personal pi vendor
@Pi_vendor_247
where can I find a legit pi merchant onlineDOT TECH
Yes. This is very easy what you need is a recommendation from someone who has successfully traded pi coins before with a merchant.
Who is a pi merchant?
A pi merchant is someone who buys pi network coins and resell them to Investors looking forward to hold thousands of pi coins before the open mainnet.
I will leave the telegram contact of my personal pi merchant to trade with
@Pi_vendor_247
If you are looking for a pi coin investor. Then look no further because I have the right one he is a pi vendor (he buy and resell to whales in China). I met him on a crypto conference and ever since I and my friends have sold more than 10k pi coins to him And he bought all and still want more. I will drop his telegram handle below just send him a message.
@Pi_vendor_247
how to swap pi coins to foreign currency withdrawable.DOT TECH
As of my last update, Pi is still in the testing phase and is not tradable on any exchanges.
However, Pi Network has announced plans to launch its Testnet and Mainnet in the future, which may include listing Pi on exchanges.
The current method for selling pi coins involves exchanging them with a pi vendor who purchases pi coins for investment reasons.
If you want to sell your pi coins, reach out to a pi vendor and sell them to anyone looking to sell pi coins from any country around the globe.
Below is the contact information for my personal pi vendor.
Telegram: @Pi_vendor_247
what is the best method to sell pi coins in 2024DOT TECH
The best way to sell your pi coins safely is trading with an exchange..but since pi is not launched in any exchange, and second option is through a VERIFIED pi merchant.
Who is a pi merchant?
A pi merchant is someone who buys pi coins from miners and pioneers and resell them to Investors looking forward to hold massive amounts before mainnet launch in 2026.
I will leave the telegram contact of my personal pi merchant to trade pi coins with.
@Pi_vendor_247
Stochastic Control/Reinforcement Learning for Optimal Market Making
1. Stochastic Control for Optimal Market-Making
Ashwin Rao
ICME, Stanford University
December 25, 2019
Ashwin Rao (Stanford) Optimal Market-Making December 25, 2019 1 / 30
2. Overview
1 Trading Order Book Dynamics
2 Definition of Optimal Market-Making Problem
3 Derivation of Avellaneda-Stoikov Analytical Solution
4 Real-world Optimal Market-Making and Reinforcement Learning
Ashwin Rao (Stanford) Optimal Market-Making December 25, 2019 2 / 30
3. Trading Order Book (TOB)
Ashwin Rao (Stanford) Optimal Market-Making December 25, 2019 3 / 30
4. Basics of Trading Order Book (TOB)
Buyers/Sellers express their intent to trade by submitting bids/asks
These are Limit Orders (LO) with a price P and size N
Buy LO (P,N) states willingness to buy N shares at a price ≤ P
Sell LO (P,N) states willingness to sell N shares at a price ≥ P
Trading Order Book aggregates order sizes for each unique price
So we can represent with two sorted lists of (Price, Size) pairs
Bids: [(P
(b)
i ,N
(b)
i ) 1 ≤ i ≤ m],P
(b)
i > P
(b)
j for i < j
Asks: [(P
(a)
i ,N
(a)
i ) 1 ≤ i ≤ n],P
(a)
i < P
(a)
j for i < j
We call P
(b)
1 as simply Bid, P
(a)
1 as Ask,
P
(a)
1 +P
(b)
1
2 as Mid
We call P
(a)
1 − P
(b)
1 as Spread, P
(a)
n − P
(b)
m as Market Depth
A Market Order (MO) states intent to buy/sell N shares at the best
possible price(s) available on the TOB at the time of MO submission
Ashwin Rao (Stanford) Optimal Market-Making December 25, 2019 4 / 30
5. Trading Order Book (TOB) Activity
A new Sell LO (P,N) potentially removes best bid prices on the TOB
Removal: [(P
(b)
i ,min(N
(b)
i ,max(0,N −
i−1
∑
j=1
N
(b)
j ))) (i P
(b)
i ≥ P)]
After this removal, it adds the following to the asks side of the TOB
(P,max(0,N − ∑
i P
(b)
i ≥P
N
(b)
i ))
A new Buy MO operates analogously (on the other side of the TOB)
A Sell Market Order N will remove the best bid prices on the TOB
Removal: [(P
(b)
i ,min(N
(b)
i ,max(0,N −
i−1
∑
j=1
N
(b)
j ))) 1 ≤ i ≤ m]
A Buy Market Order N will remove the best ask prices on the TOB
Removal: [(P
(a)
i ,min(N
(a)
i ,max(0,N −
i−1
∑
j=1
N
(a)
j ))) 1 ≤ i ≤ n]
Ashwin Rao (Stanford) Optimal Market-Making December 25, 2019 5 / 30
6. TOB Dynamics and Market-Making
Modeling TOB Dynamics involves predicting arrival of MOs and LOs
Market-makers are liquidity providers (providers of Buy and Sell LOs)
Other market participants are typically liquidity takers (MOs)
But there are also other market participants that trade with LOs
Complex interplay between market-makers & other mkt participants
Hence, TOB Dynamics tend to be quite complex
We view the TOB from the perspective of a single market-maker who
aims to gain with Buy/Sell LOs of appropriate width/size
By anticipating TOB Dynamics & dynamically adjusting Buy/Sell LOs
Goal is to maximize Utility of Gains at the end of a suitable horizon
If Buy/Sell LOs are too narrow, more frequent but small gains
If Buy/Sell LOs are too wide, less frequent but large gains
Market-maker also needs to manage potential unfavorable inventory
(long or short) buildup and consequent unfavorable liquidation
Ashwin Rao (Stanford) Optimal Market-Making December 25, 2019 6 / 30
7. Notation for Optimal Market-Making Problem
We simplify the setting for ease of exposition
Assume finite time steps indexed by t = 0,1,...,T
Denote Wt ∈ R as Market-maker’s trading PnL at time t
Denote It ∈ Z as Market-maker’s inventory of shares at time t (I0 = 0)
St ∈ R+
is the TOB Mid Price at time t (assume stochastic process)
P
(b)
t ∈ R+
,N
(b)
t ∈ Z+
are market maker’s Bid Price, Bid Size at time t
P
(a)
t ∈ R+
,N
(a)
t ∈ Z+
are market-maker’s Ask Price, Ask Size at time t
Assume market-maker can add or remove bids/asks costlessly
Denote δ
(b)
t = St − P
(b)
t as Bid Spread, δ
(a)
t = P
(a)
t − St as Ask Spread
Random var X
(b)
t ∈ Z≥0 denotes bid-shares “hit” up to time t
Random var X
(a)
t ∈ Z≥0 denotes ask-shares “lifted” up to time t
Wt+1 = Wt +P
(a)
t ⋅(X
(a)
t+1 −X
(a)
t )−P
(b)
t ⋅(X
(b)
t+1 −X
(b)
t ) , It = X
(b)
t −X
(a)
t
Goal to maximize E[U(WT + IT ⋅ ST )] for appropriate concave U(⋅)
Ashwin Rao (Stanford) Optimal Market-Making December 25, 2019 7 / 30
8. Markov Decision Process (MDP) Formulation
Order of MDP activity in each time step 0 ≤ t ≤ T − 1:
Observe State = (t,St,Wt,It)
Perform Action = (P
(b)
t ,N
(b)
t ,P
(a)
t ,N
(a)
t )
Experience TOB Dynamics resulting in:
random bid-shares hit = X
(b)
t+1 − X
(b)
t and ask-shares lifted = X
(a)
t+1 − X
(a)
t
update of Wt to Wt+1, update of It to It+1
stochastic evolution of St to St+1
Receive next-step (t + 1) Reward Rt+1
Rt+1 =
⎧⎪⎪
⎨
⎪⎪⎩
0 for 1 ≤ t + 1 ≤ T − 1
U(Wt+1 + It+1 ⋅ St+1) for t + 1 = T
Goal is to find an Optimal Policy π∗
:
π∗
(t,St,Wt,It) = (P
(b)
t ,N
(b)
t ,P
(a)
t ,N
(a)
t ) that maximizes E[
T
∑
t=1
Rt]
Note: Discount Factor when aggregating Rewards in the MDP is 1
Ashwin Rao (Stanford) Optimal Market-Making December 25, 2019 8 / 30
9. Avellaneda-Stoikov Continuous Time Formulation
We go over the landmark paper by Avellaneda and Stoikov in 2006
They derive a simple, clean and intuitive solution
We adapt our discrete-time notation to their continuous-time setting
X
(b)
t ,X
(a)
t are Poisson processes with hit/lift-rate means λ
(b)
t ,λ
(a)
t
dX
(b)
t ∼ Poisson(λ
(b)
t ⋅ dt) , dX
(a)
t ∼ Poisson(λ
(a)
t ⋅ dt)
λ
(b)
t = f (b)
(δ
(b)
t ) , λ
(a)
t = f (a)
(δ
(a)
t ) for decreasing functions f (b)
,f (a)
dWt = P
(a)
t ⋅ dX
(a)
t − P
(b)
t ⋅ dX
(b)
t , It = X
(b)
t − X
(a)
t (note: I0 = 0)
Since infinitesimal Poisson random variables dX
(b)
t (shares hit in time
dt) and dX
(a)
t (shares lifted in time dt) are Bernoulli (shares hit/lifted
in time dt are 0 or 1), N
(b)
t and N
(a)
t can be assumed to be 1
This simplifies the Action at time t to be just the pair: (δ
(b)
t ,δ
(a)
t )
TOB Mid Price Dynamics: dSt = σ ⋅ dzt (scaled brownian motion)
Utility function U(x) = −e−γx
where γ is coefficient of risk-aversion
Ashwin Rao (Stanford) Optimal Market-Making December 25, 2019 9 / 30
10. Hamilton-Jacobi-Bellman (HJB) Equation
We denote the Optimal Value function as V ∗
(t,St,Wt,It)
V ∗
(t,St,Wt,It) = max
δ
(b)
t ,δ
(a)
t
E[−e−γ⋅(WT +It ⋅ST )
]
V ∗
(t,St,Wt,It) satisfies a recursive formulation for 0 ≤ t < t1 < T:
V ∗
(t,St,Wt,It) = max
δ
(b)
t ,δ
(a)
t
E[V ∗
(t1,St1 ,Wt1 ,It1 )]
Rewriting in stochastic differential form, we have the HJB Equation
max
δ
(b)
t ,δ
(a)
t
E[dV ∗
(t,St,Wt,It)] = 0 for t < T
V ∗
(T,ST ,WT ,IT ) = −e−γ⋅(WT +IT ⋅ST )
Ashwin Rao (Stanford) Optimal Market-Making December 25, 2019 10 / 30
11. Converting HJB to a Partial Differential Equation
Change to V ∗
(t,St,Wt,It) is comprised of 3 components:
Due to pure movement in time t
Due to randomness in TOB Mid-Price St
Due to randomness in hitting/lifting the Bid/Ask
With this, we can expand dV ∗
(t,St,Wt,It) and rewrite HJB as:
max
δ
(b)
t ,δ
(a)
t
{
∂V ∗
∂t
dt + E[σ
∂V ∗
∂St
dzt +
σ2
2
∂2
V ∗
∂S2
t
(dzt)2
]
+ λ
(b)
t ⋅ dt ⋅ V ∗
(t,St,Wt − St + δ
(b)
t ,It + 1)
+ λ
(a)
t ⋅ dt ⋅ V ∗
(t,St,Wt + St + δ
(a)
t ,It − 1)
+ (1 − λ
(b)
t ⋅ dt − λ
(a)
t ⋅ dt) ⋅ V ∗
(t,St,Wt,It)
− V ∗
(t,St,Wt,It)} = 0
Ashwin Rao (Stanford) Optimal Market-Making December 25, 2019 11 / 30
12. Converting HJB to a Partial Differential Equation
We can simplify this equation with a few observations:
E[dzt] = 0
E[(dzt)2
] = dt
Organize the terms involving λ
(b)
t and λ
(a)
t better with some algebra
Divide throughout by dt
max
δ
(b)
t ,δ
(a)
t
{
∂V ∗
∂t
+
σ2
2
∂2
V ∗
∂S2
t
+ λ
(b)
t ⋅ (V ∗
(t,St,Wt − St + δ
(b)
t ,It + 1) − V ∗
(t,St,Wt,It))
+ λ
(a)
t ⋅ (V ∗
(t,St,Wt + St + δ
(a)
t ,It − 1) − V ∗
(t,St,Wt,It))} = 0
Ashwin Rao (Stanford) Optimal Market-Making December 25, 2019 12 / 30
13. Converting HJB to a Partial Differential Equation
Next, note that λ
(b)
t = f (b)
(δ
(b)
t ) and λ
(a)
t = f (a)
(δ
(a)
t ), and apply the max
only on the relevant terms
∂V ∗
∂t
+
σ2
2
∂2
V ∗
∂S2
t
+ max
δ
(b)
t
{f (b)
(δ
(b)
t ) ⋅ (V ∗
(t,St,Wt − St + δ
(b)
t ,It + 1) − V ∗
(t,St,Wt,It))}
+ max
δ
(a)
t
{f (a)
(δ
(a)
t ) ⋅ (V ∗
(t,St,Wt + St + δ
(a)
t ,It − 1) − V ∗
(t,St,Wt,It))} = 0
This combines with the boundary condition:
V ∗
(T,ST ,WT ,IT ) = −e−γ⋅(WT +IT ⋅ST )
Ashwin Rao (Stanford) Optimal Market-Making December 25, 2019 13 / 30
14. Converting HJB to a Partial Differential Equation
We make an “educated guess” for the structure of V ∗
(t,St,Wt,It):
V ∗
(t,St,Wt,It) = −e−γ(Wt +θ(t,St ,It ))
(1)
and reduce the problem to a PDE in terms of θ(t,St,It)
Substituting this into the above PDE for V ∗
(t,St,Wt,It) gives:
∂θ
∂t
+
σ2
2
(
∂2
θ
∂S2
t
− γ(
∂θ
∂St
)2
)
+ max
δ
(b)
t
{
f (b)
(δ
(b)
t )
γ
⋅ (1 − e−γ(δ
(b)
t −St +θ(t,St ,It +1)−θ(t,St ,It ))
)}
+ max
δ
(a)
t
{
f (a)
(δ
(a)
t )
γ
⋅ (1 − e−γ(δ
(a)
t +St +θ(t,St ,It −1)−θ(t,St ,It ))
)} = 0
The boundary condition is:
θ(T,ST ,IT ) = IT ⋅ ST
Ashwin Rao (Stanford) Optimal Market-Making December 25, 2019 14 / 30
15. Indifference Bid/Ask Price
It turns out that θ(t,St,It + 1) − θ(t,St,It) and
θ(t,St,It) − θ(t,St,It − 1) are equal to financially meaningful
quantities known as Indifference Bid and Ask Prices
Indifference Bid Price Q(b)
(t,St,It) is defined as:
V ∗
(t,St,Wt − Q(b)
(t,St,It),It + 1) = V ∗
(t,St,Wt,It) (2)
Q(b)
(t,St,It) is the price to buy a share with guarantee of immediate
purchase that results in Optimum Expected Utility being unchanged
Likewise, Indifference Ask Price Q(a)
(t,St,It) is defined as:
V ∗
(t,St,Wt + Q(a)
(t,St,It),It − 1) = V ∗
(t,St,Wt,It) (3)
Q(a)
(t,St,It) is the price to sell a share with guarantee of immediate
sale that results in Optimum Expected Utility being unchanged
We abbreviate Q(b)
(t,St,It) as Q
(b)
t and Q(a)
(t,St,It) as Q
(a)
t
Ashwin Rao (Stanford) Optimal Market-Making December 25, 2019 15 / 30
16. Indifference Bid/Ask Price in the PDE for θ
Express V ∗
(t,St,Wt − Q
(b)
t ,It + 1) = V ∗
(t,St,Wt,It) in terms of θ:
−e−γ(Wt −Q
(b)
t +θ(t,St ,It +1))
= −e−γ(Wt +θ(t,St ,It ))
⇒ Q
(b)
t = θ(t,St,It + 1) − θ(t,St,It) (4)
Likewise for Q
(a)
t , we get:
Q
(a)
t = θ(t,St,It) − θ(t,St,It − 1) (5)
Using equations (4) and (5), bring Q
(b)
t and Q
(a)
t in the PDE for θ
∂θ
∂t
+
σ2
2
(
∂2
θ
∂S2
t
− γ(
∂θ
∂St
)2
) + max
δ
(b)
t
g(δ
(b)
t ) + max
δ
(a)
t
h(δ
(b)
t ) = 0
where g(δ
(b)
t ) =
f (b)
(δ
(b)
t )
γ
⋅ (1 − e−γ(δ
(b)
t −St +Q
(b)
t )
)
and h(δ
(a)
t ) =
f (a)
(δ
(a)
t )
γ
⋅ (1 − e−γ(δ
(a)
t +St −Q
(a)
t )
)
Ashwin Rao (Stanford) Optimal Market-Making December 25, 2019 16 / 30
17. Optimal Bid Spread and Optimal Ask Spread
To maximize g(δ
(b)
t ), differentiate g with respect to δ
(b)
t and set to 0
e−γ(δ
(b)
t
∗
−St +Q
(b)
t )
⋅ (γ ⋅ f (b)
(δ
(b)
t
∗
) −
∂f (b)
∂δ
(b)
t
(δ
(b)
t
∗
)) +
∂f (b)
∂δ
(b)
t
(δ
(b)
t
∗
) = 0
⇒ δ
(b)
t
∗
= St − Q
(b)
t +
1
γ
⋅ ln(1 − γ ⋅
f (b)
(δ
(b)
t
∗
)
∂f (b)
∂δ
(b)
t
(δ
(b)
t
∗
)
) (6)
To maximize g(δ
(a)
t ), differentiate g with respect to δ
(a)
t and set to 0
e−γ(δ
(a)
t
∗
+St −Q
(a)
t )
⋅ (γ ⋅ f (a)
(δ
(a)
t
∗
) −
∂f (a)
∂δ
(a)
t
(δ
(a)
t
∗
)) +
∂f (a)
∂δ
(a)
t
(δ
(a)
t
∗
) = 0
⇒ δ
(a)
t
∗
= Q
(a)
t − St +
1
γ
⋅ ln(1 − γ ⋅
f (a)
(δ
(a)
t
∗
)
∂f (a)
∂δ
(a)
t
(δ
(a)
t
∗
)
) (7)
(6) and (7) are implicit equations for δ
(b)
t
∗
and δ
(a)
t
∗
respectively
Ashwin Rao (Stanford) Optimal Market-Making December 25, 2019 17 / 30
18. Solving for θ and for Optimal Bid/Ask Spreads
Let us write the PDE in terms of the Optimal Bid and Ask Spreads
∂θ
∂t
+
σ2
2
(
∂2
θ
∂S2
t
− γ(
∂θ
∂St
)2
)
+
f (b)
(δ
(b)
t
∗
)
γ
⋅ (1 − e−γ(δ
(b)
t
∗
−St +θ(t,St ,It +1)−θ(t,St ,It ))
)
+
f (a)
(δ
(a)
t
∗
)
γ
⋅ (1 − e−γ(δ
(a)
t
∗
+St +θ(t,St ,It −1)−θ(t,St ,It ))
) = 0
with boundary condition θ(T,ST ,IT ) = IT ⋅ ST
(8)
First we solve PDE (8) for θ in terms of δ
(b)
t
∗
and δ
(a)
t
∗
In general, this would be a numerical PDE solution
Using (4) and (5), we have Q
(b)
t and Q
(a)
t in terms of δ
(b)
t
∗
and δ
(a)
t
∗
Substitute above-obtained Q
(b)
t and Q
(a)
t in equations (6) and (7)
Solve implicit equations for δ
(b)
t
∗
and δ
(a)
t
∗
(in general, numerically)
Ashwin Rao (Stanford) Optimal Market-Making December 25, 2019 18 / 30
19. Building Intuition
Define Indifference Mid Price Q
(m)
t =
Q
(b)
t +Q
(a)
t
2
To develop intuition for Indifference Prices, consider a simple case
where the market-maker doesn’t supply any bids or asks
V ∗
(t,St,Wt,It) = E[−e−γ(Wt +It ⋅ST )
]
Combining this with the diffusion dSt = σ ⋅ dzt, we get:
V ∗
(t,St,Wt,It) = −e−γ(Wt +It ⋅St −
γ⋅I2
t ⋅σ2(T−t)
2
)
Combining this with equations (2) and (3), we get:
Q
(b)
t = St − (2It + 1)
γσ2
(T − t)
2
, Q
(a)
t = St − (2It − 1)
γσ2
(T − t)
2
Q
(m)
t = St − Itγσ2
(T − t) , Q
(a)
t − Q
(b)
t = γσ2
(T − t)
These results for the simple case of no-market-making serve as
approximations for our problem of optimal market-making
Ashwin Rao (Stanford) Optimal Market-Making December 25, 2019 19 / 30
20. Building Intuition
Think of Q
(m)
t as inventory-risk-adjusted mid-price (adjustment to St)
If market-maker is long inventory (It > 0), Q
(m)
t < St indicating
inclination to sell than buy, and if market-maker is short inventory,
Q
(m)
t > St indicating inclination to buy than sell
Armed with this intuition, we come back to optimal market-making,
observing from eqns (6) and (7): P
(b)
t
∗
< Q
(b)
t < Q
(m)
t < Q
(a)
t < P
(a)
t
∗
Think of [P
(b)
t
∗
,P
(a)
t
∗
] as “centered” at Q
(m)
t (rather than at St),
i.e., [P
(b)
t
∗
,P
(a)
t
∗
] will (together) move up/down in tandem with
Q
(m)
t moving up/down (as a function of inventory position It)
Q
(m)
t − P
(b)
t
∗
=
Q
(a)
t − Q
(b)
t
2
+
1
γ
⋅ ln(1 − γ ⋅
f (b)
(δ
(b)
t
∗
)
∂f (b)
∂δ
(b)
t
(δ
(b)
t
∗
)
) (9)
P
(a)
t
∗
− Q
(m)
t =
Q
(a)
t − Q
(b)
t
2
+
1
γ
⋅ ln(1 − γ ⋅
f (a)
(δ
(a)
t
∗
)
∂f (a)
∂δ
(a)
t
(δ
(a)
t
∗
)
) (10)
Ashwin Rao (Stanford) Optimal Market-Making December 25, 2019 20 / 30
21. Simple Functional Form for Hitting/Lifting Rate Means
The PDE for θ and the implicit equations for δ
(b)
t
∗
,δ
(a)
t
∗
are messy
We make some assumptions, simplify, derive analytical approximations
First we assume a fairly standard functional form for f (b)
and f (a)
f (b)
(δ) = f (a)
(δ) = c ⋅ e−k⋅δ
This reduces equations (6) and (7) to:
δ
(b)
t
∗
= St − Q
(b)
t +
1
γ
ln(1 +
γ
k
) (11)
δ
(a)
t
∗
= Q
(a)
t − St +
1
γ
ln(1 +
γ
k
) (12)
⇒ P
(b)
t
∗
and P
(a)
t
∗
are equidistant from Q
(m)
t
Substituting these simplified δ
(b)
t
∗
,δ
(a)
t
∗
in (8) reduces the PDE to:
∂θ
∂t
+
σ2
2
(
∂2
θ
∂S2
t
− γ(
∂θ
∂St
)2
) +
c
k + γ
(e−k⋅δ
(b)
t
∗
+ e−k⋅δ
(a)
t
∗
) = 0
with boundary condition θ(T,ST ,IT ) = IT ⋅ ST
(13)
Ashwin Rao (Stanford) Optimal Market-Making December 25, 2019 21 / 30
22. Simplifying the PDE with Approximations
Note that this PDE (13) involves δ
(b)
t
∗
and δ
(a)
t
∗
However, equations (11), (12), (4), (5) enable expressing δ
(b)
t
∗
and
δ
(a)
t
∗
in terms of θ(t,St,It − 1),θ(t,St,It),θ(t,St,It + 1)
This would give us a PDE just in terms of θ
Solving that PDE for θ would not only give us V ∗
(t,St,Wt,It) but
also δ
(b)
t
∗
and δ
(a)
t
∗
(using equations (11), (12), (4), (5) )
To solve the PDE, we need to make a couple of approximations
First we make a linear approx for e−k⋅δ
(b)
t
∗
and e−k⋅δ
(a)
t
∗
in PDE (13):
∂θ
∂t
+
σ2
2
(
∂2
θ
∂S2
t
− γ(
∂θ
∂St
)2
) +
c
k + γ
(1 − k ⋅ δ
(b)
t
∗
+ 1 − k ⋅ δ
(a)
t
∗
) = 0 (14)
Equations (11), (12), (4), (5) tell us that:
δ
(b)
t
∗
+δ
(a)
t
∗
=
2
γ
ln(1 +
γ
k
)+2θ(t,St,It)−θ(t,St,It +1)−θ(t,St,It −1)
Ashwin Rao (Stanford) Optimal Market-Making December 25, 2019 22 / 30
23. Asymptotic Expansion of θ in It
With this expression for δ
(b)
t
∗
+ δ
(a)
t
∗
, PDE (14) takes the form:
∂θ
∂t
+
σ2
2
(
∂2
θ
∂S2
t
− γ(
∂θ
∂St
)2
) +
c
k + γ
(2 −
2k
γ
ln(1 +
γ
k
)
− k(2θ(t,St,It) − θ(t,St,It + 1) − θ(t,St,It − 1))) = 0
(15)
To solve PDE (15), we consider this asymptotic expansion of θ in It:
θ(t,St,It) =
∞
∑
n=0
In
t
n!
⋅ θ(n)
(t,St)
So we need to determine the functions θ(n)
(t,St) for all n = 0,1,2,...
For tractability, we approximate this expansion to the first 3 terms:
θ(t,St,It) ≈ θ(0)
(t,St) + It ⋅ θ(1)
(t,St) +
I2
t
2
⋅ θ(2)
(t,St)
Ashwin Rao (Stanford) Optimal Market-Making December 25, 2019 23 / 30
24. Approximation of the Expansion of θ in It
We note that the Optimal Value Function V ∗
can depend on St only
through the current Value of the Inventory (i.e., through It ⋅ St), i.e.,
it cannot depend on St in any other way
This means V ∗
(t,St,Wt,0) = −e−γ(Wt +θ(0)(t,St ))
is independent of St
This means θ(0)
(t,St) is independent of St
So, we can write it as simply θ(0)
(t), meaning ∂θ(0)
∂St
and ∂2θ(0)
∂S2
t
are 0
Therefore, we can write the approximate expansion for θ(t,St,It) as:
θ(t,St,It) = θ(0)
(t) + It ⋅ θ(1)
(t,St) +
I2
t
2
⋅ θ(2)
(t,St) (16)
Ashwin Rao (Stanford) Optimal Market-Making December 25, 2019 24 / 30
25. Solving the PDE
Substitute this approximation (16) for θ(t,St,It) in PDE (15)
∂θ(0)
∂t
+ It
∂θ(1)
∂t
+
I2
t
2
∂θ(2)
∂t
+
σ2
2
(It
∂2
θ(1)
∂S2
t
+
I2
t
2
∂2
θ(2)
∂S2
t
)
−
γσ2
2
(It
∂θ(1)
∂St
+
I2
t
2
∂θ(2)
∂St
)2
+
c
k + γ
(2 −
2k
γ
ln(1 +
γ
k
) + k ⋅ θ(2)
) = 0
with boundary condition:
θ(0)
(T) + IT ⋅ θ(1)
(T,ST ) +
I2
T
2
⋅ θ(2)
(T,ST ) = IT ⋅ ST
(17)
We will separately collect terms involving specific powers of It, each
yielding a separate PDE:
Terms devoid of It (i.e., I0
t )
Terms involving It (i.e., I1
t )
Terms involving I2
t
Ashwin Rao (Stanford) Optimal Market-Making December 25, 2019 25 / 30
26. Solving the PDE
We start by collecting terms involving It
∂θ(1)
∂t
+
σ2
2
⋅
∂2
θ(1)
∂S2
t
= 0 with boundary condition θ(1)
(T,ST ) = ST
The solution to this PDE is:
θ(1)
(t,St) = St (18)
Next, we collect terms involving I2
t
∂θ(2)
∂t
+
σ2
2
⋅
∂2
θ(2)
∂S2
t
−γσ2
⋅(
∂θ(1)
∂St
)2
= 0 with boundary θ(2)
(T,ST ) = 0
Noting that θ(1)
(t,St) = St, we solve this PDE as:
θ(2)
(t,St) = −γσ2
(T − t) (19)
Ashwin Rao (Stanford) Optimal Market-Making December 25, 2019 26 / 30
27. Solving the PDE
Finally, we collect the terms devoid of It
∂θ(0)
∂t
+
c
k + γ
(2−
2k
γ
ln(1 +
γ
k
)+k⋅θ(2)
) = 0 with boundary θ(0)
(T) = 0
Noting that θ(2)
(t,St) = −γσ2
(T − t), we solve as:
θ(0)
(t) =
c
k + γ
((2 −
2k
γ
ln(1 +
γ
k
))(T − t) −
kγσ2
2
(T − t)2
) (20)
This completes the PDE solution for θ(t,St,It) and hence, for
V ∗
(t,St,Wt,It)
Lastly, we derive formulas for Q
(b)
t ,Q
(a)
t ,Q
(m)
t ,δ
(b)
t
∗
,δ
(a)
t
∗
Ashwin Rao (Stanford) Optimal Market-Making December 25, 2019 27 / 30
28. Formulas for Prices and Spreads
Using equations (4) and (5), we get:
Q
(b)
t = θ(1)
(t,St)+(2It +1)⋅θ(2)
(t,St) = St −(2It +1)
γσ2
(T − t)
2
(21)
Q
(a)
t = θ(1)
(t,St)+(2It −1)⋅θ(2)
(t,St) = St −(2It −1)
γσ2
(T − t)
2
(22)
Using equations (11) and (12), we get:
δ
(b)
t
∗
=
(2It + 1)γσ2
(T − t)
2
+
1
γ
ln(1 +
γ
k
) (23)
δ
(a)
t
∗
=
(1 − 2It)γσ2
(T − t)
2
+
1
γ
ln(1 +
γ
k
) (24)
Optimal Bid-Ask Spread δ
(b)
t
∗
+δ
(a)
t
∗
= γσ2
(T −t)+
2
γ
ln(1 +
γ
k
) (25)
Optimal “Mid” Q
(m)
t =
Q
(b)
t + Q
(a)
t
2
=
P
(b)
t
∗
+ P
(a)
t
∗
2
= St−Itγσ2
(T−t)
(26)
Ashwin Rao (Stanford) Optimal Market-Making December 25, 2019 28 / 30
29. Back to Intuition
Think of Q
(m)
t as inventory-risk-adjusted mid-price (adjustment to St)
If market-maker is long inventory (It > 0), Q
(m)
t < St indicating
inclination to sell than buy, and if market-maker is short inventory,
Q
(m)
t > St indicating inclination to buy than sell
Think of [P
(b)
t
∗
,P
(a)
t
∗
] as “centered” at Q
(m)
t (rather than at St),
i.e., [P
(b)
t
∗
,P
(a)
t
∗
] will (together) move up/down in tandem with
Q
(m)
t moving up/down (as a function of inventory position It)
Note from equation (25) that the Optimal Bid-Ask Spread
P
(a)
t
∗
− P
(b)
t
∗
is independent of inventory It
Useful view: P
(b)
t
∗
< Q
(b)
t < Q
(m)
t < Q
(a)
t < P
(a)
t
∗
, with these spreads:
Outer Spreads P
(a)
t
∗
− Q
(a)
t = Q
(b)
t − P
(b)
t
∗
=
1
γ
ln(1 +
γ
k
)
Inner Spreads Q
(a)
t − Q
(m)
t = Q
(m)
t − Q
(b)
t =
γσ2
(T − t)
2
Ashwin Rao (Stanford) Optimal Market-Making December 25, 2019 29 / 30
30. Real-world Market-Making and Reinforcement Learning
Real-world TOB dynamics are non-stationary, non-linear, complex
Frictions: Discrete Prices/Sizes, Constraints on Prices/Sizes, Fees
Need to capture various market factors in the State & TOB Dynamics
This leads to Curse of Dimensionality and Curse of Modeling
The practical route is to develop a simulator capturing all of the above
Simulator is a Market-Data-learnt Sampling Model of TOB Dynamics
Using this simulator and neural-networks func approx, we can do RL
References: 2018 Paper from University of Liverpool and
2019 Paper from JP Morgan Research
Exciting area for Future Research as well as Engineering Design
Ashwin Rao (Stanford) Optimal Market-Making December 25, 2019 30 / 30