# ML4T_2019 Fall

Course website: http://quantsoftware.gatech.edu/CS7646_Fall_2019

# Martingale

## Experiment 1

### Problem 3

Based on Figure \ref{fig: 3}, the std is growing from the start and reaching zero while the bets are more. But we can not say that the standard deviation reach a maximum value then stabilize or converge as the number of sequential bets increases because it is not just simply a increasing and decreasing function, as it fluctuate a lot. But we can say that the std is indeed converging to zero as the number of bets increases after some bets. \section{Experiment 2}

### Problem 4

Since we have finite bank roll, the bets it takes if losing sequentially and run out of money is about 8 rounds. And everytime after a winning bet, it only takes around 8 rounds to run out of money, which has quite big possibility of losing. Take the probability of winning each bet as a half for computation simplicity. Then the probability of losing is: [1/2^8+\binom{9}{8}1/2^9+\binom{10}{8}1/2^{10}+\ldots+\binom{80}{8}1/2^{80}\ge1/4] So the probability of winning is less than $3/4$ with the approximation that winning is $\frac{1}{2}$. In fact, the winning rate is smaller per bet. So probability of winning could just be $\frac{1}{2}$.

## Experiment 1

In project 6, I used four indicators including SMA, EMA, Bollinger Bands and CCI. In the implementation, I used a SMA dataframe, EMA dataframe, standard divation and a CCI dataframe and combined them to form a dataframe. And then use this as X and use the 10-day return as label y to perform learning.

For the standardization of the data, all I did is to divide the dataframe by the first day price i.e.\ normalize the data to starting from 1. This is the same method I used in Project 6 and based on the indicators I chose, the normalization to 1 is enough.

Comparing the random forest learner and the manual strategy, we can see that the random forest learner performs much more better than the manual strategy in in-sample data. Thus it shows that the performance of random forest learning strategy is much more better than manual strategy in the things that has been learned.

The assumptions used in the experiment is that the commission is 9.95 and the impact is 0.005.

I would expect this with the in-sample data every time. The way we trained the random forest, we used the data that we shouldn’t have seen which is a great help in predicting the future (we are using the future to predict the future). Thus we will always see such good results in the in-sample data.

## Experiment 2

Hypothesis: When the impact increases, the accumulated return should be significantly smaller. And there will be a lot of times the trader will do nothing, holding nothing.

The first metric to check the performance of the strategy learner is the number of zeros in the trades. The metric shows the efficient of the learner. The bigger the number, the less efficient the learner is. By using this metric, we can see that when the impact is 0, the number of zeros is 324. However when the impact reaches 0.0025, 0.01, 0.015, 0.02, the number of zeros is 349, 374, 378, 398. And we can see from the graph that when the impact is so big, our learner can not grasp a good way to profit, thus having a sinuous curve.

Another naive metric is the accumulative return. As we can see from the experiment 1, the accumulative return can reach 1.8 or higher. While in the experiment 2, using impact 0.01, 0.015, 0.02, the accumulative can merely beat 1.0 although there are times the return can reach more than 1.2.

We know that the impact affect the price in trading, more specifically, it costs more to trade. Thus intuitively, with the increasing of impact, the profit decreases.