Civil Engineering Reference
In-Depth Information
3
Model Specification, Processing, and Data
By using genetic algorithm with the process of crossing over and mutation, this
study makes each pair of parents to produce four different children. Each child will
present the information of the buying signals. Number one indicates that an investor
should buy the stock on that day. Number zero indicates that the investor should not
buy the stock on that day. The first data from the left-hand side and the last data on
the right-hand side indicate the lagged 30 days and 1 day before the selling day.
Each child will evaluate its performance against the objective function. In this
study, the objective function is the profit function as follows:
Pro f it
=(
Sellingprice
Averageprice
) ×
100
÷
AveragePrice
.
(1)
The selling price is determined by the close price on the last day before the XD
dates. The average price is the summation of the price over days that the model
suggests the investor to buy the stock divided by the numbers of buying days.
The child that yields the highest value of objective function is the child who
maximizes the profit. In the next round, this child will replace the father. The child
who yields the second highest profit will replace the mother. The process will repeat
1,000 rounds to find the final best child.
However, the model does not rely on the solution from only the final best child.
In every round, the model collects the solution of the best child. This is to ensure
that the model must not lose the best solution during the iterative process. Therefore,
there are 1,000 solutions for a family. Moreover there are 4,000 solutions from
four families. Each family will find the best solution out of those 1,000 solutions.
Comparing among the four best solutions from four families, the solution that yields
the highest profit will be the best solution (Fig. 1 ).
Finally, for the condition of the best buying strategy, the best solution must yield
the highest profit not only in a particular XD round but also in other XD rounds.
To find this, the model will produce the best solution of each XD round. A solution
will evaluate its performance in the out-of-sample tests. The model with the highest
average out-of-sample profit will represent best of the best solution (Fig. 2 ).
The criteria to detect the regime switching are as follows:
1. The buying signals must appear on at least four consecutive days. For example,
the buying signals appear on day 40, 39, 38 and 37. Then the regime switching
takes place on day 37. This rule ensures that the buying signal is strong enough
and the days around this period lay on the lower regime.
2. In case that the data ends before criteria 1 can be found, the buying signals must
appear on at least two consecutive days including the end of the data.
3. When two groups of buying signals with less than four consecutive days in each
group are separated by only one day of nonbuying signal and when there are at
least two buying signals in each group, the first day in the first group is the day
of regime switching.
Search WWH ::




Custom Search