算术交易和机器学习 Algorithmic Trading and Machine Learning MATH97109

0

这是一份 Imperial帝国理工大学 MATH97109作业代写的成功案例

算术交易和机器学习 Algorithmic Trading and Machine Learning MATH97109
<!-- wp:code -->
for p1 in range (4): # AR order
for q1 in range $(4)$ : # MA order
for p2 in range $(3)$ : # seasonal AR order
for q2 in range $(3): \quad \#$ seasonal MA order
$y$-pred $=$ []
for i, $T$ in enumerate(range (train_size, len (data))):
train_set $=$ data.iloc[T - train_size:T]
model = tsa.sARIMAX (endog=train_set, # model
specification
order $=\left(p 1,0, q^{1}\right)$,
seasonal_orde $r=\left(p^{2}, 0, q^{2}\right.$,
12)). fit ()
preds. iloc $[1,1]$ = mode 1 . forecast $($ steps $=1)[0]$ # $1-$
step ahead forecast
mse = mean_squared_error (preds.y_true, preds.y_pred)
test_results $\left[\left(p 1, q_{1}, p^{2}, q_{2}\right)\right]=$ [np.sqrt (mse),
preds. $y_{-}$true. sub (preds. Y_pred) .std(),
np. mean (aic)]
英国论文代写Viking Essay为您提供作业代写代考服务

MATH97109 COURSE NOTES :

trainsize $=10 * 252$ # 10 years
data = nasdaq_returns. clip (lower=nasdaq_returns. quantile $(.05)$,
upper=nasdaq_returns. quantile(.95))
$T=\operatorname{len}$ (nasdaq returns)
test_results $=\{\}$
for $p$ in range $(1,5)$ :
for $q$ in range $(1,5)$ :
print $\left\{f^{\prime}\{p\} \mid\{q\}^{\prime}\right)$
result $=$ []
for $s, t$ in enumerate (range(trainsize, $T-1))$ :
train_set $=$ data $+i l o c[s: t]$
test_set $=$ data.iloc[t+1] # 1 -step ahead forecast
model = arch_model (y=train_set, $p=p, q=q)$. fit (disp='off')
forecast = model. forecast (horizon=1)
$m u=$ forecast.mean. iloc $[-1,0]$
$\mathrm{var}=$ forecast. $v$ ariance. il oc $[-1,0]$
result. append ([(test_set-mul ${ }^{\star \star} 2$, var] $)$
$d f=$ pd. DataErame (result, columns= ['y_true', 'y_pred'])
test_results $[(p, q)]=$ np.sqrt (mean_squared_error (df. $q$ _true,
df. y_pred) )








金融的模拟方法 Simulation Methods for Finance MATH97116

0

这是一份 Imperial帝国理工大学 MATH97116作业代写的成功案例

金融的模拟方法 Simulation Methods for Finance MATH97116
问题 1.

which is an i.i.d. sequence of $\mathcal{U}\left([0,1]^{d}\right)$ distributed random variables. Then for any $M \in \mathbb{N}$ (large),
$$
I_{M}:=\frac{1}{M} \sum_{k=1}^{M} f\left(\vec{U}{k}\right) $$ is an unbiased estimator for $I$, that is, $$ \mathbb{E}\left[I{M}\right]:=\frac{1}{M} \sum_{k=1}^{M} \mathbb{E}\left[f\left(\vec{U}{k}\right)\right]=\mathbb{E}\left[f\left(\vec{U}{1}\right)\right]=I
$$

证明 .

Since $f$ is integrable we have by the strong law of large numbers that
$$
I_{M} \rightarrow I, \quad \text { with probability } 1 \text { as } M \rightarrow \infty
$$
If $f^{2}$ is integrable too we may define
$$
\begin{aligned}
& \operatorname{Var}\left[f\left(\vec{U}{1}\right)\right]:=\mathbb{E}\left[\left(f\left(\vec{U}{1}\right)-\mathbb{E}\left[f\left(\vec{U}{1}\right)\right]\right)^{2}\right] \ =& \mathbb{E}\left[\left(f\left(\vec{U}{1}\right)-I\right)^{2}\right]=\int_{[0,1]^{d}}(f(x)-I)^{2} d x=: \sigma_{f}^{2}
\end{aligned}
$$


英国论文代写Viking Essay为您提供作业代写代考服务

MATH97116 COURSE NOTES :

Thus, in order to get a statistical accuracy of $\epsilon$, i.e.
$$
\sqrt{\mathbb{E}\left[\left(I_{M}-I\right)^{2}\right]} \sim \epsilon
$$
we need
$$
\sigma_{M}^{2}=\sigma_{f}^{2} / M \sim \epsilon^{2},
$$
at computation costs
$$
C(\epsilon) \sim M .
$$
Hence, the Monte Carlo complexity is
$$
C(\epsilon) \sim \frac{\sigma_{f}^{2}}{\epsilon^{2}},
$$








利率模型 Interest Rate Models MATH97114

0

这是一份 Imperial帝国理工大学 MATH97114作业代写的成功案例

利率模型 Interest Rate Models MATH97114
问题 1.

Integrating both sides and taking exponentials of both sides we get the following expression for the unit zero coupon bond:
$$
P_{t}(x)=e^{-\int_{0}^{x} f_{t}(s) d s} .
$$
If we rewrite using the notation $x=T-t$, we get:
$$
P_{t}(x)=e^{-x r_{t}(x)}
$$

证明 .

for the relationship between the discount unit bond and the spot rate. In terms of the forward rates it reads:
$$
r_{t}(x)=\frac{1}{x} \int_{0}^{x} f_{t}(s) d s .
$$
This relation can be inverted to express the forward rates as function of the spot rate:
$$
f_{t}(x)=r_{t}(x)+x \frac{\partial}{\partial r} r_{t}(x) .
$$


英国论文代写Viking Essay为您提供作业代写代考服务

MATH97114 COURSE NOTES :

If $X^{(1)}, X^{(2)} \ldots$ form a sequence of random vectors, each with the same law in $\mathbb{R}^{m}$, then the strong law of large numbers tells us that the estimators
$$
\mu_{N}=\frac{1}{N} \sum_{i=1}^{N} X^{(i)}
$$
and
$$
Q_{N}=\frac{1}{N-1} \sum_{i=1}^{N}\left(X^{(i)}-\mu_{N}\right) \otimes\left(X^{(i)}-\mu_{N}\right)
$$








C++语言 Computing in C++MATH97112

0

这是一份 Imperial帝国理工大学 MATH97112作业代写的成功案例

C++语言 Computing in C++MATH97112
typedef CORBA::Float $\quad$ FloatArray [4];
typedef CORBA: Float FloatArray slice;
EloatArray_slice * $\quad$ FloatArray_alloc();
EloatArray_slice * $\quad$ EloatArray dupl
typedef CORBA::String_mgr Strarray [15] [10];
$\begin{array}{ll}\text { typedef CORBA::String_mgr } & \text { Strarray_slice }[10] ; \\ \text { StrArray_slice * } * \text { StrArray_alloc(); } \\ \text { Strarray_slice * } & \text { StrArray_dup(const Strarray_slice } * \text { ); }\end{array}$
StrArray copyl Strarray,slice * const Strarray_slice * to,
$\begin{array}{ll}\text { void } & \text { ); } \\ \text { struct } S \text { frarray_ree(Strarray_slice } * \text { ) ; }\end{array}$
CORBA: :String_mgr s_mem;
is
typedef $S \quad$ Structarray [20];
typedef $S$ Structarray_slice;
Structarray_slice * $\quad$ StructArray_alloc();
Structarray_slice * $\quad$ StructArray_dupl
const Structarray_slice *
):
void
StructArray_copy
Structarray slice * to,
const structarray_slice * from
)
vOid
Structarray_free (StructArray_slice *);
英国论文代写Viking Essay为您提供作业代写代考服务

MATH97115 COURSE NOTES :

$/ /$ Allocate $2-D$ array of 150 empty strings
StrArray_slice * sp1 = StrArray_alloc ();
$/ /$ Assign one element
spl $[0][0]=$ CORBA: :string_dup ("Hello");
$/ /$ Allocate copy of spl
StrArray_slice * sp2 = StrArray_dup $($ spl 1$)$;
StrArray $x$; $/ / 2-D$ array on the stack
StrArray_copy $(\& x, \operatorname{sp} 1) ; / /$ Copy contents of spl into $x$
StrArray_free $(\mathrm{sp} 2)$; $/ /$ Deallocate
StrArray_free (sp1); $\quad / /$ Deallocate








金融中的统计方法 Statistical Methods in Finance MATH97115

0

这是一份 Imperial帝国理工大学 MATH97115作业代写的成功案例

金融中的统计方法 Statistical Methods in Finance MATH97115
问题 1.

To analyze the multivariate normal case, it is convenient to work in vector form. Let $\mathbf{r}=\left(r_{1}, r_{2}, \cdots, r_{T}\right)^{\prime}$ and $\eta=\left(\eta_{0}, \eta_{1}, \ldots, \eta_{T}\right)^{\prime}$ so that
$$
\tilde{\mathbf{r}}=\mathbf{r}+\mathbf{B} \eta
$$
Here B is a selection matrix with first row $[-1,-1,0, \cdots, 0]$. The covariance matrix of $r$ is $\Lambda=\operatorname{diag}\left(\sigma_{t}^{2}\right.$ ). The Kalman smoother equations (in vector form) are
$$
\hat{\mathbf{r}}=\Lambda\left(\Lambda+\sigma_{\eta}^{2} \mathbf{B B}^{\prime}\right)^{-1} \tilde{\mathbf{r}} \text { and } \Sigma=\sigma_{\eta}^{2} \mathbf{B}\left(\mathbf{I}+\sigma_{\eta}^{2} \mathbf{B}^{\prime} \Lambda^{-1} \mathbf{B}\right)^{-1} \mathbf{B}^{\prime}
$$

证明 .

From Assumption 1, it follows that $r_{t} \mid \sigma_{t}^{2} \sim N\left(0, \sigma_{t}^{2}\right)$. If we extend the assumption to
$$
\left(\begin{array}{l}
\mathbf{r} \
\eta
\end{array}\right) \sim N_{T}\left(0,\left(\begin{array}{cc}
\Lambda & 0 \
0 & \sigma_{\eta}^{2} \mathbf{I}
\end{array}\right)\right)
$$
then it is simple to derive the conditional distribution of $\tilde{r} \mid r$. Specifically,
$$
\mathbf{r} \mid \tilde{\mathbf{r}} \sim N_{T}(\hat{\mathbf{r}}, \Sigma)
$$


英国论文代写Viking Essay为您提供作业代写代考服务

MATH97115 COURSE NOTES :

Specifically, we will focus on SV of order one $\left(L_{w}=1\right)$. Set
$$
\begin{gathered}
\theta=\left(a, r_{y}, r_{w}\right)^{\prime} \
v_{l}(\theta) \equiv \exp \left(\frac{a w_{l-1}+r_{w} v_{t}}{2}\right) r_{y} z_{l}, \quad \forall t
\end{gathered}
$$
may then be conveniently rewritten as the following identity:
$$
y_{t}-x_{t}^{\prime} \beta=v_{t}(\theta), \quad \forall t
$$








量化风险管理 Quantitative Risk Management  MATH97108

0

这是一份 Imperial帝国理工大学 MATH97108作业代写的成功案例

量化风险管理 Quantitative Risk Management  MATH97108
问题 1.

Moments of a time series. Assuming they exist, we define the mean function $\mu(t)$ and autocovariance function $\gamma(t, s)$ of $\left(X_{t}\right){t \in \mathbb{Z}}$ by $$ \begin{aligned} \mu(t) &=E\left(X{t}\right), & & t \in \mathbb{Z}, \
\gamma(t, s) &=E\left(\left(X_{t}-\mu(t)\right)\left(X_{s}-\mu(s)\right)\right), & t, s \in \mathbb{Z} .
\end{aligned}
$$
It follows that the autocovariance function satisfies $\gamma(t, s)=\gamma(s, t)$ for all $t, s$, and $\gamma(t, t)=\operatorname{var}\left(X_{t}\right) .$

证明 .

(covariance stationarity). The time series $\left(X_{t}\right)_{t \in \mathbb{Z}}$ is covariance stationary (or weakly or second-order stationary) if the first two moments exist and satisfy
$$
\begin{aligned}
\mu(t) &=\mu, & & t \in \mathbb{Z} \
\gamma(t, s) &=\gamma(t+k, s+k), & t, s, k \in \mathbb{Z}
\end{aligned}
$$


英国论文代写Viking Essay为您提供作业代写代考服务

MATH97108  COURSE NOTES :

For all practical purposes we can restrict our study of ARMA processes to causal ARMA processes. By this we mean processes satisfying which have a representation of the form
$$
X_{t}=\sum_{i=0}^{\infty} \psi_{i} \varepsilon_{t-i},
$$
where the $\psi_{i}$ are coefficients which must satisfy
$$
\sum_{i=0}^{\infty}\left|\psi_{i}\right|<\infty .
$$








随机过程 Stochastic Processes  MATH97113

0

这是一份 Imperial帝国理工大学 MATH97113作业代写的成功案例

随机过程 Stochastic Processes  MATH97113
问题 1.

Proof:
First note that $e\left(f_{1}\right), \ldots, e\left(f_{n}\right)$ are linearly independent whenever $f_{1}, \ldots, f_{n}$ are distinct, from which it is clear that $\sum_{i=1}^{n} x_{i} \otimes e\left(f_{i}\right)=0$ implies $x_{i}=0$ for all $i$, whenever $f_{i}$ ‘s are distinct. This will establish that the processes are well defined. The second part of the lemma will follow from Lemma 4.2.10 with the choice of the dense set $\mathcal{E}$ to be $\mathcal{E}(k)$ and $\mathcal{H}=\Gamma(k)$ and by noting the fact that $\mathcal{L}, \delta, \delta^{\prime}$ and $\sigma$ have appropriate ranges. For example,
$$
\left\langle e(g), a_{g}^{\dagger}(\Delta)(x \otimes e(f))\right\rangle=\langle e(g), e(f)\rangle \int_{\Delta}\left\langle g(s), \delta^{\prime}(x)\right\rangle d s,
$$

证明 .

which belongs to $\mathcal{A}$, so the range of $a_{g^{\prime}}^{\dagger}(\Delta)$ is contained in $\mathcal{A} \otimes \Gamma(k)$. Similarly, one verifies that
$$
\left\langle e(g), \Lambda_{a}(\Delta)(x \otimes e(f))\right\rangle=\langle e(g), e(f)\rangle \int_{\Delta}\left\langle g(s), \sigma(x){f(s)}\right\rangle d s, $$ which belongs to $\mathcal{A}$ since $\sigma(x) \in \mathcal{A} \otimes \mathcal{B}\left(k{0}\right)$.


英国论文代写Viking Essay为您提供作业代写代考服务

MATH97113  COURSE NOTES :

For fixed $x \in \mathcal{A}, u \in h$ and $f \in L_{\mathrm{bc}}^{4}$, we define the integral $\int_{0}^{t} Y(s) \circ\left(a_{\delta}+\mathcal{I}{\mathcal{L}}\right)(d s)(x \otimes e(f)) u$ by setting it to be equal to $$ \int{0}^{t} Y(s)\left(\left(\mathcal{L}(x)+\left\langle\delta\left(x^{}\right), f(s)\right\rangle\right) \otimes e(f)\right) u d s $$ This integral exists and is finite since $s \mapsto Y(s)\left(\left(\mathcal{L}(x)+\left\langle\delta\left(x^{}\right), f(s)\right\rangle\right) \otimes\right.$ $e(f)) u$ is strongly integrable over $[0, t]$. We define the integral involving the other two processes, that is, $\int_{0}^{t} Y(s) \circ\left(\Lambda_{a}+a_{g}^{\dagger}\right)(d s)(x \otimes e(f)) u$ by setting it to be equal to
$$
\left(\int_{0}^{t} \Lambda_{T_{x}}(d s)+a_{S_{x}}^{\dagger}(d s)\right) u e(f),
$$
which is well-defined by Corollary








金融数学 Investments and Portfolio Management  BUSI97631

0

这是一份 Imperial帝国理工大学  BUSI97631作业代写的成功案例

金融数学 Maths for Finance FINANCE 2110 
问题 1.

The discount is $2 \%$. The annualized cost of not taking the discount can be calculated when the invoice is paid on:
Day 40: $\left(1+\frac{0.02}{1-0.02}\right)^{\frac{365}{40-10}}-1=27.9 \%$
Day $50:\left(1+\frac{0.02}{1-0.02}\right)^{\frac{365}{50-10}}-1=20.2 \%$
Day 60: $\left(1+\frac{0.02}{1-0.02}\right)^{\frac{365}{60-10}}-1=15.9 \%$
The annualized cost of trade credit decrea ses as the payment period increases. If the company does not take the $2 \%$ discount within the first ten days, it should wait until the due date (day 60 ) to pay the invoice.

证明 .

Our primary quantitative measure of payables management is average days of payables outstanding, which can also be calculated as:
$$
\text { number of days of payables }=\frac{\text { accounts payable }}{\text { average day’s purchases }}
$$
where:
$$
\text { average day’s purchases }=\frac{\text { annual purchases }}{365}
$$


英国论文代写Viking Essay为您提供作业代写代考服务

BUSI97631  COURSE NOTES :

Ending value $=(1,000)(1.05)(0.92)(1.12)=\$ 1,081.92$
Holding period return $=(1.05)(0.92)(1.12)-1=0.08192=8.192 \%$, which can also be calculated as $1,081.92 / 1,000-1=8.192 \%$.
Arithmetic mean return $=(5 \%-8 \%+12 \%) / 3=3 \%$.
Geometric mean return $=\sqrt[3]{(1.05)(0.92)(1.12)}-1=0.02659=2.66 \%$, which can also be calculated as geometric mean return $=\sqrt[3]{1+\mathrm{HPR}}-1=\sqrt[3]{1.08192}-1=2.66 \%$








金融分析 资产财富 FINANCIAL ANALYSIS ASSET WEALTH FINANCE 8450

0

这是一份 Imperial帝国理工大学 FINANCE 8450作业代写的成功案例

金融数学 Maths for Finance FINANCE 2110 

A universe of 25 million addressable homes
A response (“buy”) rate of $4 \%$, or 1 million households
A PPV price of $\$ 10$
That the movie company or other program supplier retains $40 \%$ of the PPV price to the viewer
That a program wholesaler/distributor retains $10 \%$ in return for setting up marketing and distribution and the MSO retains $50 \%$

英国论文代写Viking Essay为您提供作业代写代考服务

FINANCE 8450  COURSE NOTES :

$$
\text { WACC }=\mathrm{debt} /(\mathrm{debt}+\text { equity }) \times r_{d}+\text { equity } /(\text { debt }+\text { equity }) \times r_{e} \text {, }
$$
where $r_{d}$ is the cost of debt expressed as an interest rate and $r_{e}$ is the cost of equity as estimated using risk premiums and risk adjustment factors (known as betas).








金融数学 Maths for Finance FINANCE 2110 

0

这是一份 Imperial帝国理工大学 FINANCE 3442作业代写的成功案例

金融数学 Maths for Finance FINANCE 2110 
问题 1.

Not surprisingly, we will examine the characteristic function of $S$ as a means to determining its probability distribution. For matrix-valued random variables we consider
$$
f(\Theta)=E e^{i \operatorname{Tr}\left(X X^{T} \Theta\right)}=E e^{i x_{k}^{j} x_{l}^{j} \Theta_{\mathbf{k}}}=E e^{i x_{k}^{j} \Theta_{\mathbf{k}} x_{l}^{j}}=\left(E e^{i x_{k}^{1} \Theta_{\mathbf{k}} x_{l}^{1}}\right)^{n}
$$

证明 .

$$
g=E_{t} e^{i \Theta_{i j} z_{i}(T) z_{j}(T)}
$$
with $z$ a correlated, driftless Brownian motion (with covariance structure represented by $\Sigma$ ). We have that
$$
g_{t}+\frac{1}{2} \Sigma_{i j} g_{z_{i} z_{j}}=0
$$


英国论文代写Viking Essay为您提供作业代写代考服务

FINANCE 2110  COURSE NOTES :

Consider a sample of size $T$, denoted by
$$
X=\left(\begin{array}{ccc}
z_{1} & \cdots & z_{T} \
v_{1} & \cdots & v_{T}
\end{array}\right)
$$
Now, divide this sample into $T-p$ overlapping blocks of size $p+1$ and define the vector $y$ via $y_{j}=\left(z_{j}^{T}, \ldots, z_{j+\rho}^{T}\right)^{T}$. The empirical characteristic function $(\mathrm{ECF})$ is then given by
$$
g(\phi ; y)=\frac{1}{T-p} \sum_{j=1}^{T-p} e^{i \phi^{T} y}
$$
Denoting the (unconditional) characteristic function in by $f(\phi)$ and the underlying vector of model parameters by $\theta$. An ECF estimator can then be crafted à la GMM as
$$
\hat{\theta}=\arg \min {\theta} \int{-\infty}^{\infty}|f(\phi)-g(\phi ; y)|^{2} w(\phi) d \phi
$$