## 金融代写|市场微观结构与算法交易代写Market Microstructure and Algorithmic Trading代考|FIN602

statistics-lab™ 为您的留学生涯保驾护航 在代写市场微观结构与算法交易Market Microstructure and Algorithmic Trading方面已经树立了自己的口碑, 保证靠谱, 高质且原创的统计Statistics代写服务。我们的专家在代写市场微观结构与算法交易Market Microstructure and Algorithmic Trading代写方面经验极为丰富，各种代写市场微观结构与算法交易Market Microstructure and Algorithmic Trading相关的作业也就用不着说。

• Statistical Inference 统计推断
• Statistical Computing 统计计算
• (Generalized) Linear Models 广义线性模型
• Statistical Machine Learning 统计机器学习
• Longitudinal Data Analysis 纵向数据分析
• Foundations of Data Science 数据科学基础

## 金融代写|市场微观结构与算法交易代写Market Microstructure and Algorithmic Trading代考|Market microstructure

Despite the beauty and simplicity of MPT and CAPM, the theory they rely on, i.e. the Efficient Market Theory (EMT) is too reductionistic and idealistic when compared with real market conditions. Therefore, MPT and CAPM must be handled with care since they both can lead to wrong conclusions.

Let us study each one of the hypotheses of the EMT, the framework in which MPT and CAPM were developed.

1. Existence of a single market price.
According to the theory, market prices reflect the fundamental value of assets. However, the very notion of price is very ambiguous. Indeed, in any market we have several prices coexisting simultaneously: ask price, bid price, mid-point, last traded price, average price, etc. Moreover, this single-price assumption ignores the price formation process, depends on the subtleties of each market and explains why do we have different prices at different markets and.
2. Information is complete and perfect.
According to EMT, economic information is complete, perfect and everyone has access to it. Therefore, if investors are rational they will all have the same expectations on the future behavior of assets. In practice this is not true because there exists and asymmetry of information. Indeed, not only information has a price (e.g. real-time access via Bloomberg or Reuters) but also markets have different degrees of transparency (e.g. dark pools).
3. All investors are equal.
If all investors were rational and share the same information then they would all have the same expectations on the future value of assets, and in consequence they would all have the same behavior. However, since there is a huge heterogeneity of investors it is not realistic at all to consider that all investors are equal, as the EMT does. Indeed, each single investor has a personal strategy (long-only, long-short, hedging, speculation, arbitrage), a time horizon (ranging from several years to milliseconds) and an asset preference (equities, foreign exchange, interest rates, credit, derivatives, venture capital).

## 金融代写|市场微观结构与算法交易代写Market Microstructure and Algorithmic Trading代考|Market orders

A Market order is an instruction to trade a given quantity at the best price possible. Market orders demand liquidity because their focus is on completing the order. Therefore, the main risk is the uncertainty of the ultimate execution price: if the volume at the current market price is not enough then the market order jumps to the next level of the order book; this process goes on until the order is fully executed.

A Limit order is an instruction to trade a given quantity at a specified price or better. A buy limit order must execute at or below this limit price, whereas a sell order must execute at or above it.
A Market-to-limit order is an hybrid instruction constituted by a market order with an implicit price limit. When the order arrives it behaves as a market order, seeking liquidity at the best price available, which we call the entry price. As soon as the order starts to execute, it becomes a limit-order with limit price equals to the entry price. Unlike a traditional market order, a market-to-limit order does not sweep the order book. If there is insufficient liquidity available at the best price, the order will convert into a standing limit order for the residual amount.

A Stop order is an extension of the market-to-limit order with a limit price further away from the last execution price: the trading is activated or stopped when a certain threshold price is reached. There are three important examples of stop orders. Stop-loss orders are designed to protect a potential gain: for long (resp. short) positions the execution is stopped if prices go above (resp. below) the threshold. Contingent or if-touched orders remain hidden until the threshold is reached, in which case they become active; hence, they are the mirror orders of stop-loss. Stop limit orders have two thresholds, one that activates the order and the other one that deactivates it; hence, they are a hybrid built with one stop-loss and one contingent order.
An Iceberg order is an order with a small part visible in the order book and a significantly larger hidden volume. These orders slice the total amount to be exchanged into several tranches. The first tranche constitutes the visible part, and as soon as it is completely executed the next tranche becomes visible. The interest of iceberg orders is that they provide an automated slicing program for orders of big size. However, the hidden tranches lose time priority in the order book; they only have price priority.

A Peg order is an instruction with a dynamic limit price. The price is automatically adjusted according to the evolution the spread: for long (resp. short) positions they always hit the best bid (resp. ask) price. In consequence, peg orders are always first in price priority and second in time priority. There are also peg orders with stop-limits, which follow the best price until it reaches the deactivating threshold.

# 市场微观结构与算法交易代考

## 金融代写|市场微观结构与算法交易代写Market Microstructure and Algorithmic Trading代考|Market microstructure

1. 存在单一市场价格。
根据该理论，市场价格反映了资产的基本价值。然而，价格的概念非常模糊。事实上，在任何市场中，我们都有几个价格同时存在：卖价、买价、中间价、最后交易价、平均价等。而且，这种单一价格假设忽略了价格形成过程，取决于每个价格的微妙之处市场并解释为什么我们在不同的市场有不同的价格。
2. 信息完整、完善。
根据 EMT，经济信息是完整的、完美的，每个人都可以访问它。因此，如果投资者是理性的，他们对资产的未来行为都会有相同的预期。实际上，这是不正确的，因为存在信息不对称。事实上，不仅信息有价格（例如通过彭博社或路透社的实时访问），而且市场也有不同程度的透明度（例如暗池）。
3. 所有投资者都是平等的。
如果所有投资者都是理性的并且共享相同的信息，那么他们对资产的未来价值都会有相同的预期，因此他们都会有相同的行为。然而，由于投资者存在巨大的异质性，因此像 EMT 那样认为所有投资者都是平等的根本不现实。事实上，每个投资者都有自己的个人策略（多头、多头、空头、对冲、投机、套利）、时间范围（从几年到几毫秒不等）和资产偏好（股票、外汇、利率、信贷、衍生品、风险投资）。

## 有限元方法代写

tatistics-lab作为专业的留学生服务机构，多年来已为美国、英国、加拿大、澳洲等留学热门地的学生提供专业的学术服务，包括但不限于Essay代写，Assignment代写，Dissertation代写，Report代写，小组作业代写，Proposal代写，Paper代写，Presentation代写，计算机作业代写，论文修改和润色，网课代做，exam代考等等。写作范围涵盖高中，本科，研究生等海外留学全阶段，辐射金融，经济学，会计学，审计学，管理学等全球99%专业科目。写作团队既有专业英语母语作者，也有海外名校硕博留学生，每位写作老师都拥有过硬的语言能力，专业的学科背景和学术写作经验。我们承诺100%原创，100%专业，100%准时，100%满意。

## MATLAB代写

MATLAB 是一种用于技术计算的高性能语言。它将计算、可视化和编程集成在一个易于使用的环境中，其中问题和解决方案以熟悉的数学符号表示。典型用途包括：数学和计算算法开发建模、仿真和原型制作数据分析、探索和可视化科学和工程图形应用程序开发，包括图形用户界面构建MATLAB 是一个交互式系统，其基本数据元素是一个不需要维度的数组。这使您可以解决许多技术计算问题，尤其是那些具有矩阵和向量公式的问题，而只需用 C 或 Fortran 等标量非交互式语言编写程序所需的时间的一小部分。MATLAB 名称代表矩阵实验室。MATLAB 最初的编写目的是提供对由 LINPACK 和 EISPACK 项目开发的矩阵软件的轻松访问，这两个项目共同代表了矩阵计算软件的最新技术。MATLAB 经过多年的发展，得到了许多用户的投入。在大学环境中，它是数学、工程和科学入门和高级课程的标准教学工具。在工业领域，MATLAB 是高效研究、开发和分析的首选工具。MATLAB 具有一系列称为工具箱的特定于应用程序的解决方案。对于大多数 MATLAB 用户来说非常重要，工具箱允许您学习应用专业技术。工具箱是 MATLAB 函数（M 文件）的综合集合，可扩展 MATLAB 环境以解决特定类别的问题。可用工具箱的领域包括信号处理、控制系统、神经网络、模糊逻辑、小波、仿真等。

## 金融代写|市场微观结构与算法交易代写Market Microstructure and Algorithmic Trading代考|QF302

statistics-lab™ 为您的留学生涯保驾护航 在代写市场微观结构与算法交易Market Microstructure and Algorithmic Trading方面已经树立了自己的口碑, 保证靠谱, 高质且原创的统计Statistics代写服务。我们的专家在代写市场微观结构与算法交易Market Microstructure and Algorithmic Trading代写方面经验极为丰富，各种代写市场微观结构与算法交易Market Microstructure and Algorithmic Trading相关的作业也就用不着说。

• Statistical Inference 统计推断
• Statistical Computing 统计计算
• (Generalized) Linear Models 广义线性模型
• Statistical Machine Learning 统计机器学习
• Longitudinal Data Analysis 纵向数据分析
• Foundations of Data Science 数据科学基础

When it comes to intraday trading strategies we have the following dilemma, also known the trader’s dilemma: If we trade slow then prices will move away from their current quote, i.e. we are facing a market risk; however, if we trade fast then our order will drive quotes away from the current one, i.e. we will have a great market impact (see Figure 1.4).

Recall that in MPT we optimize the joint effect of two oppossite forces: minimizing the risk of the portfolio and maximizing the (expected) return. Following the idea of the efficient frontier, it seems natural to build up a optimization program that minimizes simultaneously both market risk and market impact.

Suppose we need to sell a certain amount of asset $S$ during the day. We split the trading order in exactly $N$ small sub-orders of size $\nu_n, n=1, \ldots, N$. The goal is to find the right trading proportions
$$\nu_i \geq 0, \quad i=1, \ldots, N ; \quad \sum_{n=1}^N \nu_n=1,$$
that minimize the expected loss due to market risk and market impact.
As we will see in later chapters, the set of minimizers constitute a curve, the optimal trading curve. For a given risk level (variance), the trading strategy $P$ on the optimal trading curve is the one that minimizes the expected market costs, i.e. the joint effects of market risk and market impact (see Figure 1.3).

## 金融代写|市场微观结构与算法交易代写Market Microstructure and Algorithmic Trading代考|The scope of this m´emoire

The goal of this mémoire is to describe thoroughly the construction of the optimal trading curve $\left(x_0, \ldots, x_N\right)$ for different market models and portfolio strategies.

In Chapter 2 we will study the market microstructure. We will see how the hypotheses of MPT and CAPM, i.e. the Efficient Market Theory, are all violated in real markets. We will focus in particular on the effect of transaction costs and market impact. We will also review the benchmarks used for monitoring trades.

Roughly speaking, a trading strategy is algorithmic if it is stripped of human decisions (and emotions). In Chapter 3 we will describe what is algorithmic trading. We will survey the basic strategies in algorithmic trading, which are the bricks with which almost any systematic trading strategy can be constructed. We will also show evidence that favors algorithmic over human trading.

In Chapter 4 we will construct the optimal trading curve $\left(x_0, \ldots, x_N\right)$ under normality assumptions, i.e. where the asset follows a Brownian motion. This chapter will be based on the article of Almgren and Chriss [1] for single assets and on the work of Lehalle [14] for multi-asset

In Chapter 5 we will construct again the optimal trading curve $\left(x_0, \ldots, x_N\right)$, but following Lehalle [14] we will consider that the portfolio has mean-reverting dynamics. We will solve analytically and numerical a simplified case of a mean-reverting portfolio using the shooting method, which is a numerical technique used in differential equations. The novelty of our approach is the alternative optimization program we use: we will construct the optimal trading curve using 1-dimensional algorithm regardless of the total number of trades $N$. Being more advantageous than the classical approaches based on functional optimization in $\mathbb{R}^N$, this approach could be of interest for systematic brokers and traders.

Chapter 6 is the final chapter. We will make some remarks on the portfolio models we have presented and mention some possible extensions. We will also review several alternative models for time series that could be used to describe markets more accurately. Finally, we will comment on the pros and cons of automated (algorithmic-based) trading with respect to discretionary (human-based) trading.

# 市场微观结构与算法交易代考

$$\nu_i \geq 0, \quad i=1, \ldots, N ; \quad \sum_{n=1}^N \nu_n=1,$$

## 有限元方法代写

tatistics-lab作为专业的留学生服务机构，多年来已为美国、英国、加拿大、澳洲等留学热门地的学生提供专业的学术服务，包括但不限于Essay代写，Assignment代写，Dissertation代写，Report代写，小组作业代写，Proposal代写，Paper代写，Presentation代写，计算机作业代写，论文修改和润色，网课代做，exam代考等等。写作范围涵盖高中，本科，研究生等海外留学全阶段，辐射金融，经济学，会计学，审计学，管理学等全球99%专业科目。写作团队既有专业英语母语作者，也有海外名校硕博留学生，每位写作老师都拥有过硬的语言能力，专业的学科背景和学术写作经验。我们承诺100%原创，100%专业，100%准时，100%满意。

## MATLAB代写

MATLAB 是一种用于技术计算的高性能语言。它将计算、可视化和编程集成在一个易于使用的环境中，其中问题和解决方案以熟悉的数学符号表示。典型用途包括：数学和计算算法开发建模、仿真和原型制作数据分析、探索和可视化科学和工程图形应用程序开发，包括图形用户界面构建MATLAB 是一个交互式系统，其基本数据元素是一个不需要维度的数组。这使您可以解决许多技术计算问题，尤其是那些具有矩阵和向量公式的问题，而只需用 C 或 Fortran 等标量非交互式语言编写程序所需的时间的一小部分。MATLAB 名称代表矩阵实验室。MATLAB 最初的编写目的是提供对由 LINPACK 和 EISPACK 项目开发的矩阵软件的轻松访问，这两个项目共同代表了矩阵计算软件的最新技术。MATLAB 经过多年的发展，得到了许多用户的投入。在大学环境中，它是数学、工程和科学入门和高级课程的标准教学工具。在工业领域，MATLAB 是高效研究、开发和分析的首选工具。MATLAB 具有一系列称为工具箱的特定于应用程序的解决方案。对于大多数 MATLAB 用户来说非常重要，工具箱允许您学习应用专业技术。工具箱是 MATLAB 函数（M 文件）的综合集合，可扩展 MATLAB 环境以解决特定类别的问题。可用工具箱的领域包括信号处理、控制系统、神经网络、模糊逻辑、小波、仿真等。

## 金融代写|市场微观结构与算法交易代写Market Microstructure and Algorithmic Trading代考|FE570

statistics-lab™ 为您的留学生涯保驾护航 在代写市场微观结构与算法交易Market Microstructure and Algorithmic Trading方面已经树立了自己的口碑, 保证靠谱, 高质且原创的统计Statistics代写服务。我们的专家在代写市场微观结构与算法交易Market Microstructure and Algorithmic Trading代写方面经验极为丰富，各种代写市场微观结构与算法交易Market Microstructure and Algorithmic Trading相关的作业也就用不着说。

• Statistical Inference 统计推断
• Statistical Computing 统计计算
• (Generalized) Linear Models 广义线性模型
• Statistical Machine Learning 统计机器学习
• Longitudinal Data Analysis 纵向数据分析
• Foundations of Data Science 数据科学基础

## 金融代写|市场微观结构与算法交易代写Market Microstructure and Algorithmic Trading代考|Modern Portfolio Theory (MPT) and efficient frontier

MPT (or Markowitz Portfolio) was developed by Markowitz in 1952. The idea behind MPT is simple yet insightful. Imagine a market with two assets $A$ and $B$, in which we invest today $(t=0)$ and at time $t=1$ we recover our initial investment plus the profits of the period. Assume that the probability distributions of $A$ and $B$ are known, i.e. their means $r_A, r_B$ and variances $\sigma_A, \sigma_B$ are information available to everybody.
Suppose $r_A>r_B$ and $\sigma_A>\sigma_B$. Then we have two natural choices:

• Maximize profits regardless of the risk (i.e. variance). In this case we choose asset $A$.
• Minimize risk regardless of profit. In this case we choose $B$.
Now suppose that the correlation $\rho$ between both assets is negative and that short-selling is not allowed. Then there exists an investment strategy $\omega \in(0,1)$ such that the corresponding portfolio
$$P=\omega A+(1-\omega) B$$
has minimal variance, i.e. $\sigma_P<\sigma_B$. Portfolio $P$ is called the minimal variance portfolio (see Figure 1.1).

In general, if the market consists on $N$ assets $A_1, \ldots, A_N$, there is an investment strategy
$$\omega_i \geq 0, \quad i=1, \ldots, N ; \quad \sum_{i=1}^N \omega_i=1$$ such that the portfolio
$$P=\sum_{i=1}^N \omega_i A_i$$
has minimal variance, i.e.
$$\sigma_P \leq \min \left{\sigma_i: i=1, \ldots, N\right} .$$
Moreover, if at least one of the correlations is negative then inequality (1.1) is strict.
Now suppose we want to minimize the variance of our portfolio $P$ for a given target return $r$. Then the optimization program is to minimize $\sigma_P$ under the constraints
$$\omega_i \geq 0, \quad i=1, \ldots, N ; \quad \sum_{i=1}^N \omega_i=1 ; \quad \sum_{i=1}^N \omega_i r_i=r .$$
Analogously, for a given risk level $\sigma$ we can maximize the portfolio return $r_p$ under the constraints
$$\omega_i \geq 0, \quad i=1, \ldots, N ; \quad \sum_{i=1}^N \omega_i=1 ; \quad \sigma_P=\sigma .$$

## 金融代写|市场微观结构与算法交易代写Market Microstructure and Algorithmic Trading代考|Capital Asset Pricing Model (CAPM) and betas

MPT is a great idea that relies on the calculation of the variance-covariance matrix. However, when the number of assets grows it becomes very hard to calculate. Indeed, For $N$ assets, since the $N \times N$ variance-covariance matrix is symmetric it has $N(N+1) / 2$ degrees of freedom (See Table 1.1).

In order to overcome this difficulty, we could try to calculate first a market portfolio, which includes all available assets, and then compare this market portfolio with each and every one of the single assets. If we proceed this way then the number of degrees of freedom is $2(N+1)$ : $N+1$ volatilities and $N+1$ correlations. This is far more manageable than the $N(N+1) / 2$ degrees of freedom in MPT.

This is the idea behind CAPM, which was developed by Sharpe, a PhD student of Markowitz, in 1964. According to CAPM, the return of an asset $i$ is
$$r^i=r^f+\beta_{i M}\left(r^M-r^f\right)+\varepsilon_i, \quad \beta_{i M}=\frac{\operatorname{cov}\left(r^i, r^M\right)}{\operatorname{var}\left(r^M\right)},$$
where $r^i$ is the return of asset $i, r^f$ the return of the risk-free asset (e.g. Treasure bonds) and $r^M$ the market return. $\beta_{i M}$ is the marginal contribution of asset $i$ to market risk, also known as the systematic risk or market risk, whereas $\varepsilon_i$ is the idiosyncratic risk. The idiosincratic risk can be eliminated via diversification, whereas the systematic risk is inherent of the market and cannot be diversified away.

Now let us study the relative returns with respect to the risk-free asset. Taking expectations in (1.2) it follows that that the expected return of asset $i$ over the risk-less rate $r_f$ is
$$E\left(r^i-r^f\right)=\beta_{i M} E\left(r^M-r^f\right) .$$
As we can see from (1.2), the beta of asset $i$ (i.e. its systematic risk $\beta_{i M}$ ) acts as an amplifier of the expected market returns (see Figure 1.3).

# 市场微观结构与算法交易代考

## 金融代写|市场微观结构与算法交易代写Market Microstructure and Algorithmic Trading代考|Modern Portfolio Theory (MPT) and efficient frontier

MPT (或 Markowitz 投资组合) 由 Markowitz 于 1952 年开发。MPT 背后的理念简单而富有洞察力。想 象一个有两种资产的市场 $A$ 和 $B$ ，我们今天投资的 $(t=0)$ 并且在时间 $t=1$ 我们收回了我们的初始投资加 上当期的利润。假设概率分布 $A$ 和 $B$ 是已知的，即他们的手段 $r_A, r_B$ 和方差 $\sigma_A, \sigma_B$ 是每个人都可以获得 的信息。

• 不考虑风险（即方差），实现利润最大化。在这种情况下，我们选择资产 $A$.
• 无论利润如何，都将风险降至最低。在这种情况下我们选择 $B$. 现在假设相关性 $\rho$ 两种资产之间为负，不允许卖空。那么存在一个投资策略 $\omega \in(0,1)$ 这样相应的投 资组合
$$P=\omega A+(1-\omega) B$$
方差最小，即 $\sigma_P<\sigma_B$. 文件夹 $P$ 称为最小方差投资组合（见图 1.1）。
一般来说，如果市场由 $N$ 资产 $A_1, \ldots, A_N$ ，有一个投资策略
$$\omega_i \geq 0, \quad i=1, \ldots, N ; \quad \sum_{i=1}^N \omega_i=1$$
这样投资组合
$$P=\sum_{i=1}^N \omega_i A_i$$
方差最小，即
此外，如果至少一个相关性为负，则不等式 (1.1) 是严格的。
现在假设我们想要最小化投资组合的方差 $P$ 对于给定的目标回报 $r$. 那么优化方案就是最小化 $\sigma_P$ 约束之下
$$\omega_i \geq 0, \quad i=1, \ldots, N ; \quad \sum_{i=1}^N \omega_i=1 ; \quad \sum_{i=1}^N \omega_i r_i=r .$$
类似地，对于给定的风险水平 $\sigma$ 我们可以最大化投资组合回报 $r_p$ 约束之下
$$\omega_i \geq 0, \quad i=1, \ldots, N ; \quad \sum_{i=1}^N \omega_i=1 ; \quad \sigma_P=\sigma$$

## 金融代写|市场微观结构与算法交易代写Market Microstructure and Algorithmic Trading代考|Capital Asset Pricing Model (CAPM) and betas

MPT 是一个很棒的想法，它依赖于方差-协方差矩阵的计算。然而，当资产数量增加时，计算变得非常困 难。的确，为了 $N$ 资产，自 $N \times N$ 方差-协方差矩阵是对称的它有 $N(N+1) / 2$ 自由度（见表 1.1）。

$$r^i=r^f+\beta_{i M}\left(r^M-r^f\right)+\varepsilon_i, \quad \beta_{i M}=\frac{\operatorname{cov}\left(r^i, r^M\right)}{\operatorname{var}\left(r^M\right)},$$

$$E\left(r^i-r^f\right)=\beta_{i M} E\left(r^M-r^f\right) .$$

## 有限元方法代写

tatistics-lab作为专业的留学生服务机构，多年来已为美国、英国、加拿大、澳洲等留学热门地的学生提供专业的学术服务，包括但不限于Essay代写，Assignment代写，Dissertation代写，Report代写，小组作业代写，Proposal代写，Paper代写，Presentation代写，计算机作业代写，论文修改和润色，网课代做，exam代考等等。写作范围涵盖高中，本科，研究生等海外留学全阶段，辐射金融，经济学，会计学，审计学，管理学等全球99%专业科目。写作团队既有专业英语母语作者，也有海外名校硕博留学生，每位写作老师都拥有过硬的语言能力，专业的学科背景和学术写作经验。我们承诺100%原创，100%专业，100%准时，100%满意。

## MATLAB代写

MATLAB 是一种用于技术计算的高性能语言。它将计算、可视化和编程集成在一个易于使用的环境中，其中问题和解决方案以熟悉的数学符号表示。典型用途包括：数学和计算算法开发建模、仿真和原型制作数据分析、探索和可视化科学和工程图形应用程序开发，包括图形用户界面构建MATLAB 是一个交互式系统，其基本数据元素是一个不需要维度的数组。这使您可以解决许多技术计算问题，尤其是那些具有矩阵和向量公式的问题，而只需用 C 或 Fortran 等标量非交互式语言编写程序所需的时间的一小部分。MATLAB 名称代表矩阵实验室。MATLAB 最初的编写目的是提供对由 LINPACK 和 EISPACK 项目开发的矩阵软件的轻松访问，这两个项目共同代表了矩阵计算软件的最新技术。MATLAB 经过多年的发展，得到了许多用户的投入。在大学环境中，它是数学、工程和科学入门和高级课程的标准教学工具。在工业领域，MATLAB 是高效研究、开发和分析的首选工具。MATLAB 具有一系列称为工具箱的特定于应用程序的解决方案。对于大多数 MATLAB 用户来说非常重要，工具箱允许您学习应用专业技术。工具箱是 MATLAB 函数（M 文件）的综合集合，可扩展 MATLAB 环境以解决特定类别的问题。可用工具箱的领域包括信号处理、控制系统、神经网络、模糊逻辑、小波、仿真等。