Location>code7788 >text

The Potential for Mean-Regression Strategies to Profit in the A-Share ETF Market

Popularity:718 ℃/2024-09-25 11:08:38

How to profit in the stock market

Once someone told me a secret to make money in the stock market, as long as you master this secret, making money is as easy as picking up money. He said: the secret is actually very simple, is to buy when the stock price is low, sell when the price is high.

Gee, it's not a secret, it's obviously a load of crap, but you can't pick it apart.

The question is, how do you tell if the price is low or high? I know what you want to say: value. Below value is low, above value is high. But how do you estimate its value? I know that now there are a whole lot of valuation methods, formula indicators flying all over the place, but any formula any indicator is a reference can not be used directly. And when you can not accurately estimate the value, nothing else can be said. As for the stock god's "value investing", you say it is art or say it is metaphysics also, are not my mortal can understand.

Since we are mortal, we have to use mortal methods. If the formula is too complicated for people to understand, if the indicators are too many for people to do nothing, then we don't use them, we will simply and roughly average. Of course, we can not just take any stock and average it, we have to pick, pick the kind of up and down, not all the way down, not all the way up (I know you may favor this kind of stock, but this kind of stock is not suitable for mean reversion). In statistical terms, that's smooth, and our goal is to find the kind of stock whose price behaves smoothly over the time series.

After we find a stock with a flat price, we also have to figure out how often it goes from a low to a high and then back to a high, the cycle. There are two reasons for this: 1. We want to discard the ones with too long a cycle, you don't want to wait 5 years to earn 1%. 2. We try to complete a buying and selling operation within a cycle, don't miss the cycle, it fluctuates from lows to highs 10 times a year, and you buy and sell it once, that would be a bit of a let down.

Next, we need to address these two issues: smoothness and cycles.

Smoothness Test

I'm going to use ETF data to test this, as ETFs are associated with a basket of stocks, which should be smoother and more in line with our intentions compared to a single stock. (As for, picking multiple stocks by yourself and combining them with different weights to achieve smoothing, that's a different issue, I'll talk about it later when I have a chance) All the data is available through akshare, you can visit akshare's official website for more information.

The Dickey-Fuller test is used to determine the smoothness of a stock price series. As for the principles of the Dickey-Fuller test, you can do your own search or see some of the concepts I've put together in this post on the Dickey-Fuller test1.

We first check out all the ETFs in A-shares and then test them one by one. The detection is done by obtaining only the data after January 1, 2023, using the closing price.

import akshare as ak
import pandas as pd
from import adfuller
from datetime import datetime

def adf_test(hist_data):
    results=adfuller(hist_data, maxlag=None, regression='c', autolag='AIC')
    # print('ADF Statistic: %f' % results[0])
    # print('p-value: %f' % results[1])
    # print('Critical Values:')
    # for key, value in results[4].items():  
    # print('\t%s: %.3f' % (key, value))
    if results[1] > 0.05:
        # print("The time series is non-stationary,p-value > 0.05")
        return False
    else:
        # print("The time series is smooth,p-value <= 0.05")
        return True
    
def process_row(row):
    # print(row)
    hist_data = ak.fund_etf_hist_sina(symbol=row['coding'])
    if 'date' not in hist_data.columns:
        print('date not in clolumns coding:%s name (of a thing):%s ' % (row['coding'],row['name (of a thing)']))
        print(hist_data)
        return None
    hist_data.set_index('date',inplace=True)
    y=hist_data.loc[hist_data.index >= ('2023-01-01','%Y-%m-%d').date(), 'close']
    # print(y)
    if len(hist_data) < 15:
        # print('coding:%s name (of a thing):%s ' % (row['coding'],row['name (of a thing)']))
        # print(f"Data length: {len(y)}")
        return None
    if adf_test(y):
         print('coding:%s name (of a thing):%s time series (stats.)adfThe test results are smooth' % (row['coding'],row['name (of a thing)']))
         return row['coding'],row['name (of a thing)']
    else:
        return None
# Get allETFFund Information
fund_etf_category_sina_df = ak.fund_etf_category_sina(symbol="ETFfund")
# 对所有fund做DFbeta (software)
results = fund_etf_category_sina_df.apply(process_row,axis=1).dropna()
p_results = [r for r in results if r is not None]
results_df = (p_results, columns=['coding', 'name (of a thing)'])
print(results_df)
# Save the results to thecsv
results_df.to_csv('datas/eft_fund_stationary_results.csv', index=False)
Code:sz159939 Name:Information Technology ETF Time Series adf test result is smooth
Code:sz159933 Name:CIC Financial Real Estate ETF Time series adf test result is smooth
Code:sz159811 Name:5G50ETF Time series adf test result is smooth
Code:sz159607 Name:China Internet ETF Time series adf test result is smooth
Code:sz159605 Name:China Internet ETF Time series adf test result is smooth
Code:sz159587 Name:Grain 50 ETF Time series adf test result is smooth
Code:sz159579 Name:Shenzhen Mainboard 50 ETF Huaan Time series adf test result is smooth
Code:sz159570 Name:HFT Innovative Pharmaceuticals ETF Time series adf test result is smooth
Code:sz159569 Name:HK Dividend Low Wave ETF Time series adf test result is smooth
Code:sz159567 Name:HK Innovative Pharmaceuticals ETF Time series adf test result is smooth
Code:sz159557 Name:Hang Seng Healthcare Index ETF Time series adf test result is smooth
Code:sz159552 Name:CSI 2000 Enhanced ETF Time series adf test result is smooth
Code:sz159545 Name:Hang Seng Dividend Low Volatility ETF Time series adf test result is smooth
Code:sz159507 Name:Telecom ETF Time series adf test result is smooth
Code:sz159331 Name:Dividend HK ETF Time series adf test result is smooth
Code:sz159330 Name:CSI 300 ETF Time series adf test result is smooth
Code:sz159329 Name:Saudi Arabia ETF Time series adf test result is smooth
Code:sz159005 Name:ETF Express ETF Time series adf test result is smooth
Code:sz159003 Name:China Merchants Express ETF Time series adf test result is smooth
Code:sz159001 Name:Currency ETF Time series adf test result is smooth
Code:sh563180 Name:High Dividend ETF Time series adf test result is smooth
Code:sh520830 Name:Saudi Arabia ETF Time series adf test result is smooth
Code:sh516110 Name:Auto ETF Time Series adf test result is stable
Code:sh512640 Name:Financial Real Estate ETF Time series adf test result is smooth
Code:sh512160 Name:MSCI China A-Share ETF Time series adf test result is smooth
Code:sh511990 Name:HUABOOM TYI ETF The time series adf test result is smooth.
Code:sh511980 Name:Cash Plus ETF Time series adf test result is smooth
Code:sh511970 Name:China Life Currency ETF Time series adf test result is smooth
Code:sh511960 Name:Harvest Express ETF Time series adf test result is smooth
Code:sh511950 Name:Timely Currency ETF Time series adf test result is smooth
Code:sh511930 Name:Guotai Rising Currency ETF Time series adf test result is smooth
Code:sh511920 Name:GF Currency ETF Time series adf test result is smooth
Code:sh511910 Name:Rongtong Currency ETF Time series adf test result is smooth
Code:sh511900 Name:Fortune Currency ETF Time series adf test result is smooth
Code:sh511860 Name:Margin Currency ETF Time series adf test result is smooth
Code:sh511850 Name:Fortune ETF Time series adf test result is smooth
Code:sh511830 Name:Huatai Currency ETF Time series adf test result is smooth
Code:sh511820 Name:Penghua Timely ETF Time series adf test result is smooth
Code:sh511810 Name:WealthGold Currency ETF Time series adf test result is smooth
Code:sh511800 Name:Efunds Currency ETF Time series adf test result is smooth
Code:sh511770 Name:Golden Eagle Gain Currency ETF Time series adf test result is smooth
Code:sh511700 Name:OTC Currency ETF Time series adf test result is smooth
Code:sh511690 Name:On-Trade Currency ETF Time Series adf test result is smooth
Code:sh511670 Name:Huatai Daily Gold ETF Time series adf test result is smooth
Code:sh511660 Name:Currency ETF Jianxin Tianyi Time series adf test result is smooth
Code:sh511650 Name:Huaxia Express ETF Time series adf test result is smooth
Code:sh511620 Name:Currency ETF Time series adf test result is smooth
Code:sh511600 Name:Currency ETF Time series adf test result is smooth
          Code Name
0 sz159939 Information Technology ETF
1 sz159933 Guotou Financial Real Estate ETF
2 sz159811 5G50ETF
3 sz159607 China Internet ETF
4 sz159605 China Internet ETF
5 sz159587 Grain 50 ETF
6 sz159579 Shenzhen Main Board 50 ETF Huaan
7 sz159570 HKEx Innovative Pharmaceuticals ETF
8 sz159569 HK Dividend Low Volatility ETF
9 sz159567 HK Innovative Medicine ETF
10 sz159557 Hang Seng Healthcare Index ETF
11 sz159552 CSI 2000 Enhanced ETF
12 sz159545 Hang Seng Dividend Low Volatility ETF
13 sz159507 Telecommunications ETF
14 sz159331 Dividend HK Stocks ETF
15 sz159330 CSI 300 ETFs
16 sz159329 Saudi Arabia ETF
17 sz159005 ETF ETF
18 sz159003 China Merchants Express ETF
19 sz159001 Currency ETF
20 sh563180 High Dividend ETFs
21 sh520830 Saudi Arabia ETF
22 sh516110 Automotive ETF
23 sh512640 Financials & Real Estate ETFs
24 sh512160 MSCI China A-Share ETF
25 sh511990 Huabao Timmy ETF
26 sh511980 Cash Plus ETF
27 sh511970 Guoshou Currency ETF
28 sh511960 Harvest Express ETF
29 sh511950 Timely Currency ETF
30 sh511930 Guotai Rising Currency ETF
31 sh511920 Guangfa Currency ETF
32 sh511910 Rongtong Currency ETF
33 sh511900 Wells Fargo Currency ETF
34 sh511860 Margin Currency ETF
35 sh511850 Wealth Treasure ETF
36 sh511830 Huatai Currency ETF
37 sh511820 Penghua Timely ETF
38 sh511810 WealthGold Currency ETF
39 sh511800 Efangda Currency ETF
40 sh511770 Golden Eagle Gain Currency ETF
41 sh511700 OTC Currency ETFs
42 sh511690 Exchange Traded Currency ETFs
43 sh511670 Huatai Daily Gold ETF
44 sh511660 Currency ETF Jianxin Tianyi
45 sh511650 Huaxia Express ETF
46 sh511620 Currency ETFs
47 sh511600 Currency ETF

half-life

In the code below, the half-life is obtained from an autoregressive analysis (AR model) of the time series data, and some of the concepts are organized in this article on the Dickey-Fuller test. As for, why, I can't explain it. If you can explain, please drop me a line.

import as sm
import numpy as np

def get_halflife(y):
    ylag = () #Create a lag variable
    # print(ylag)
    deltay = y - ylag #Calculate the difference between the closing price
    # print(deltay)
    deltay = deltay[1:] #Delete the firstNaN(be) worth
    # print(deltay)

    # print(ylag[1:])
    X=sm.add_constant(ylag[1:]) # Adding constant terms to lagged variables
    # print(X)
    model=(deltay, X) #Create a linear regression model
    res=() #fit a model (math.)
    halflife=-(2)/[1] #Calculate half-life
    print('halflife:',halflife)
    return halflife

stationary_df = pd.read_csv('datas/eft_fund_stationary_results.csv')

# Iterate through each row
for index, row in stationary_df.iterrows():
    print(f"Row index: {index}, Values: {row['coding']}, {row['name (of a thing)']}")
    fund_etf_hist_sina_df = ak.fund_etf_hist_sina(symbol=row['coding'])
    # print(fund_etf_hist_sina_df)
    fund_etf_hist_sina_df.set_index('date',inplace=True)
    y=fund_etf_hist_sina_df.loc[fund_etf_hist_sina_df.index >= ('2022-01-01','%Y-%m-%d').date(), 'close']
    halflife = get_halflife(y)
    if halflife is not None:
        stationary_df.loc[index, 'half-life'] = halflife
        stationary_df.loc[index, 'highest price'] = ()
        stationary_df.loc[index, 'lowest price'] = ()
    # print(stationary_df)
    
stationary_df.to_csv('datas/eft_fund_stationary_halflife.csv', index=False)
Row index: 0, Values: sz159939, Information Technology ETFs
halflife: 92.34305228118055
Row index: 1, Values: sz159933, China Investment Financial Real Estate ETF
halflife: 20.68724512575711
Row index: 2, Values: sz159811, 5G50ETF
halflife: 26.37190816021413
Row index: 3, Values: sz159607, Mid-Cap Internet ETF
halflife: 17.28790422641463
Row index: 4, Values: sz159605, Mid-Cap Internet ETF
halflife: 17.06493212981132
Row index: 5, Values: sz159587, Grain 50 ETF
halflife: 2.949089109871738
Row index: 5, Values: sz159587, Grain 50 ETF halflife: 2.949089109871738
halflife: 2.813338527596978
Row index: 7, Values: sz159570, HKEx Innovative Medicine ETF
halflife: 6.72602477892452
Row index: 8, Values: sz159569, HK Dividend Low Volatility ETF
halflife: 6.982621873502573
Row index: 9, Values: sz159567, HK Innovative Pharmaceuticals ETF
halflife: 5.551490912970278
Row index: 10, Values: sz159557, Hang Seng Healthcare Index ETF
halflife: 3.886180626825971
Row index: 11, Values: sz159552, CSI 2000 Enhanced ETF
halflife: 1.6623555515355546
Row index: 12, Values: sz159545, Hang Seng Dividend Low Volatility ETF
halflife: 9.563267261024693
Row index: 13, Values: sz159507, Telecommunications ETF
halflife: 15.354744585135212
Row index: 14, Values: sz159331, Dividend HK ETF
halflife: 5.127745146257745
Row index: 15, Values: sz159330, CSI 300 ETF Fund
halflife: 6.224023324277483
Row index: 16, Values: sz159329, Saudi Arabia ETF
halflife: 4.358172512022778
Row index: 17, Values: sz159005, ETF Fast Money ETF
halflife: 0.6930003555249722
Row index: 18, Values: sz159003, China Merchants Express ETF
halflife: 1.4086066553569159
Row index: 19, Values: sz159001, Currency ETFs
halflife: 0.7891527486212535
Row index: 20, Values: sh563180, High Dividend ETFs
halflife: 16.960359750665614
Row index: 21, Values: sh520830, Saudi Arabia ETF
halflife: 3.7269403800137626
Row index: 22, Values: sh516110, Automotive ETF
halflife: 23.956386651978036
Row index: 23, Values: sh512640, Financials & Real Estate ETFs
halflife: 21.492512923053198
Row index: 24, Values: sh512160, MSCI China A-Share ETF
halflife: 106.42494264934585
Row index: 25, Values: sh511990, Warburg PincusETF
halflife: 1.0355531761823507
Row index: 26, Values: sh511980, Cash Convertible ETF
halflife: 0.8344262170791367
Row index: 27, Values: sh511970, China Life Currency ETF
halflife: 0.729031882259672
Row index: 28, Values: sh511960, Harvest Express ETF
halflife: 2.4253386106330748
Row index: 29, Values: sh511950, Timely CurrencyETF
halflife: 1.1395445691593764
Row index: 30, Values: sh511930, Guotai Rising Currency ETF
halflife: 0.7663723096457301
Row index: 31, Values: sh511920, Guangfa Currency ETF
halflife: 0.9131814944393649
Row index: 32, Values: sh511910, Yuntong Currency ETF
halflife: 0.7700386811412008
Row index: 33, Values: sh511900, Wells Fargo Currency ETF
halflife: 0.9199089818384839
Row index: 34, Values: sh511860, Margin Currency ETF
halflife: 0.7353234140098629
Row index: 35, Values: sh511850, Wealth Bond ETF
halflife: 1.7391021847980375
Row index: 36, Values: sh511830, Huatai Currency ETF
halflife: 0.7853783252242303
Row index: 37, Values: sh511820, Penghua Timely ETF
halflife: 0.6984652914285889
Row index: 38, Values: sh511810, MoneyGram Currency ETF
halflife: 1.1692529552911715
Row index: 39, Values: sh511800, eFunds Currency ETF
halflife: 0.8153931709406015
Row index: 40, Values: sh511770, Golden Eagle Gain Currency ETF
halflife: 0.7606485418287927
Row index: 41, Values: sh511700, OTC Currency ETFs
halflife: 0.8159305221884142
Row index: 42, Values: sh511690, Traded Currency ETFs
halflife: 0.8158787320359637
Row index: 43, Values: sh511670, Huatai Daily Gold ETF
halflife: 1.4621583710852248
Row index: 44, Values: sh511660, Currency ETF Jianxin Tianyi
halflife: 0.9027364815815827
Row index: 45, Values: sh511650, Huaxia Express ETF
halflife: 0.7742258733578317
Row index: 46, Values: sh511620, Money Fund ETF
halflife: 0.7385332559142509
Row index: 47, Values: sh511600, Currency ETFs
halflife: 0.714136626739289

We filtered it further by discarding those with half-lives that were too long (greater than 30) and too short (less than 5).

target_df = pd.read_csv('datas/eft_fund_stationary_halflife.csv')

filtered_df = target_df[(target_df['halflife'] > 5) & (target_df['halflife'] < 30)].copy()

filtered_df.loc[:, 'Maximum gain'] = (filtered_df['Maximum price'] - filtered_df['Minimum price']) / filtered_df['Minimum price']
# Sort by largest increase in descending order
sorted_df = filtered_df.sort_values(by='Maximum increase', ascending=False)
# pd.set_option('display.max_rows', 100) # Set to display up to 100 rows
# Print the results
print(sorted_df)
          Code Name Half-Life Highest Price Lowest Price Maximum Gain
3 sz159607 China Internet ETF 17.287904 0.960 0.545 0.761468
4 sz159605 China Internet ETF 17.064932 0.957 0.545 0.755963
2 sz159811 5G50ETF 26.371908 1.281 0.771 0.661479
22 sh516110 Auto ETF 23.956387 1.312 0.828 0.584541
13 sz159507 Telecom ETF 15.354745 1.024 0.736 0.391304
23 sh512640 financial real estate etf fund 21.492513 2.110 1.564 0.349105
9 sz159567 hk innovative drugs etf 5.551491 1.004 0.754 0.331565
1 sz159933 Guotai Financial Real Estate ETF 20.687245 2.526 1.900 0.329474
7 sz159570 hkx innovative drugs etf 6.726025 0.923 0.753 0.225764
12 sz159545 hang seng dividend low vol ETF 9.563267 1.132 0.977 0.158649
20 sh563180 high dividend etf 16.960360 1.036 0.933 0.110397
14 sz159331 dividend * stock etf 5.127745 1.011 0.924 0.094156
8 sz159569 HK Dividend Low Volatility ETF 6.982622 1.016 0.939 0.082002
15 sz159330 hsb 300 etf fund 6.224023 1.002 0.951 0.053628

The gains were ranked above, and the mid-cap Internet ETFs were the biggest gainers, so let's pull the data and verify it

etf_df = ak.fund_etf_hist_sina(symbol='sz159607')
etf_df.set_index('date',inplace=True)
close_data=etf_df.loc[etf_df.index >= ('2023-01-01','%Y-%m-%d').date(), 'close'].to_frame()
# close_data.plot(figsize=(12, 6))
close_data['MA17'] = close_data.rolling(window=17).mean().ffill()
close_data.plot(y=['close', 'MA17'], figsize=(12, 6))

This curve looks ok, it should make money. Try backtesting it with backtrader.

from datetime import datetime
import backtrader as bt
import pandas as pd

class SimpleMovingAverage():
    """
    master strategist
    """
    params = (("maperiod", 17),) # Setting the parameters of the trading strategy globally

    def __init__(self):
        """
        initialization function
        """
        self.data_close = [0].close # Specify price sequence
        # Initialize trade orders、Purchase and sale prices and commission
         = None
        self.buy_price = None
        self.buy_comm = None
        # Add Moving Average Indicator
         = (
            [0], period=
        )
    
    def log(self, txt, dt=None):
        dt = dt or [0].(0)
        print('%s, %s' % ((), txt))

    def next(self):
        """
        implementation logic
        """
        if :  # Check if there are instructions waiting to be executed,
            return
        if self.data_close[0] > [0]:# Execute sell condition judgment:Closing price above the daily average
            if : # Check to see if the position is held
                 = (size=20000)
        if self.data_close[0] < [0]: # Execute buy condition judgment:Closing price below the daily average
             = (size=20000)
    
    def notify_order(self, order):
        if in [, ]:
            return
        if in []:
            if ():
                ('BUY EXECUTED, Price: %.2f, Cost: %.2f, Comm %.2f' %
                        (,
                        ,
                        ))
                 =
                 =
            elif ():
                ('SELL EXECUTED, Price: %.2f, Cost: %.2f, Comm %.2f' %
                         (,
                          ,
                          ))
            self.bar_executed = len(self)
        elif in [, , ]:
            ('Order Canceled/Margin/Rejected')
         = None

def get_data_byakshare(code,start_date,end_date):
    fund_etf_hist_sina_df = ak.fund_etf_hist_sina(symbol=code)
    df=fund_etf_hist_sina_df.loc[(fund_etf_hist_sina_df['date'] >= start_date) & (fund_etf_hist_sina_df['date'] <= end_date)]
    # print(df)
     = ['trade_date', 'open', 'high', 'low', 'close','volume']
    # [:, 'trade_date'] = pd.to_datetime(df['trade_date'])
    df.set_index('trade_date', inplace=True)
     = pd.to_datetime()
    # ()

    return df
cerebro = ()

(SimpleMovingAverage)
start_date = datetime(2024, 3, 1) # Backtest start time
end_date = datetime(2024, 9, 1) # Backtest End Time
stock_code = "sz159607"

data = get_data_byakshare(stock_code,start_date.date(),end_date.date())
datafeed = (dataname=data,
                                fromdate=start_date,
                                todate=end_date)
(datafeed,name=stock_code)

(100000.0)
# (, stake=10)
(commission=0.002)

print('combinatorial initial value: %.2f' % ())

result=()

print('portfolio end value: %.2f' % ())
# ()
combinatorial initial value: 100000.00
2024-04-16, BUY EXECUTED, Price: 0.71, Cost: 14300.00, Comm 28.60
2024-04-17, BUY EXECUTED, Price: 0.71, Cost: 14220.00, Comm 28.44
2024-04-18, BUY EXECUTED, Price: 0.71, Cost: 14120.00, Comm 28.24
2024-04-19, BUY EXECUTED, Price: 0.70, Cost: 14020.00, Comm 28.04
2024-04-22, BUY EXECUTED, Price: 0.71, Cost: 14140.00, Comm 28.28
2024-04-23, BUY EXECUTED, Price: 0.73, Cost: 14680.00, Comm 29.36
2024-04-24, SELL EXECUTED, Price: 0.76, Cost: 14246.67, Comm 30.36
2024-04-25, SELL EXECUTED, Price: 0.77, Cost: 14246.67, Comm 30.80
2024-04-26, SELL EXECUTED, Price: 0.77, Cost: 14246.67, Comm 30.96
2024-04-29, SELL EXECUTED, Price: 0.80, Cost: 14246.67, Comm 31.92
2024-04-30, SELL EXECUTED, Price: 0.80, Cost: 14246.67, Comm 31.80
2024-05-06, SELL EXECUTED, Price: 0.84, Cost: 14246.67, Comm 33.44
2024-05-27, BUY EXECUTED, Price: 0.84, Cost: 16800.00, Comm 33.60
2024-05-28, SELL EXECUTED, Price: 0.85, Cost: 16800.00, Comm 33.96
2024-05-29, BUY EXECUTED, Price: 0.84, Cost: 16760.00, Comm 33.52
2024-05-30, BUY EXECUTED, Price: 0.82, Cost: 16440.00, Comm 32.88
2024-05-31, BUY EXECUTED, Price: 0.83, Cost: 16580.00, Comm 33.16
2024-06-03, BUY EXECUTED, Price: 0.82, Cost: 16360.00, Comm 32.72
2024-06-04, BUY EXECUTED, Price: 0.82, Cost: 16380.00, Comm 32.76
2024-06-05, BUY EXECUTED, Price: 0.83, Cost: 16520.00, Comm 33.04
2024-06-06, Order Canceled/Margin/Rejected
2024-06-07, Order Canceled/Margin/Rejected
2024-06-11, Order Canceled/Margin/Rejected
2024-06-12, Order Canceled/Margin/Rejected
2024-06-13, Order Canceled/Margin/Rejected
2024-06-14, Order Canceled/Margin/Rejected
2024-06-17, Order Canceled/Margin/Rejected
2024-06-18, Order Canceled/Margin/Rejected
2024-06-19, Order Canceled/Margin/Rejected
2024-06-20, SELL EXECUTED, Price: 0.84, Cost: 16506.67, Comm 33.48
2024-06-21, SELL EXECUTED, Price: 0.82, Cost: 16506.67, Comm 32.76
2024-06-24, BUY EXECUTED, Price: 0.80, Cost: 16040.00, Comm 32.08
2024-06-25, BUY EXECUTED, Price: 0.80, Cost: 16080.00, Comm 32.16
2024-06-26, Order Canceled/Margin/Rejected
2024-06-27, Order Canceled/Margin/Rejected
2024-06-28, Order Canceled/Margin/Rejected
2024-07-01, Order Canceled/Margin/Rejected
2024-07-02, Order Canceled/Margin/Rejected
2024-07-03, Order Canceled/Margin/Rejected
2024-07-04, Order Canceled/Margin/Rejected
2024-07-05, Order Canceled/Margin/Rejected
2024-07-08, Order Canceled/Margin/Rejected
2024-07-09, Order Canceled/Margin/Rejected
2024-07-10, Order Canceled/Margin/Rejected
2024-07-11, Order Canceled/Margin/Rejected
2024-07-12, SELL EXECUTED, Price: 0.82, Cost: 16357.78, Comm 32.68
2024-07-15, SELL EXECUTED, Price: 0.82, Cost: 16357.78, Comm 32.88
2024-07-16, SELL EXECUTED, Price: 0.80, Cost: 16357.78, Comm 32.04
2024-07-17, SELL EXECUTED, Price: 0.80, Cost: 16357.78, Comm 31.88
2024-07-18, SELL EXECUTED, Price: 0.79, Cost: 16357.78, Comm 31.48
2024-07-19, BUY EXECUTED, Price: 0.79, Cost: 15700.00, Comm 31.40
2024-07-22, BUY EXECUTED, Price: 0.78, Cost: 15560.00, Comm 31.12
2024-07-23, BUY EXECUTED, Price: 0.80, Cost: 15900.00, Comm 31.80
2024-07-24, BUY EXECUTED, Price: 0.78, Cost: 15620.00, Comm 31.24
2024-07-25, BUY EXECUTED, Price: 0.77, Cost: 15360.00, Comm 30.72
2024-07-26, Order Canceled/Margin/Rejected
2024-07-29, Order Canceled/Margin/Rejected
2024-07-30, Order Canceled/Margin/Rejected
2024-07-31, Order Canceled/Margin/Rejected
2024-08-01, Order Canceled/Margin/Rejected
2024-08-02, Order Canceled/Margin/Rejected
2024-08-05, Order Canceled/Margin/Rejected
2024-08-06, Order Canceled/Margin/Rejected
2024-08-07, Order Canceled/Margin/Rejected
2024-08-08, Order Canceled/Margin/Rejected
2024-08-09, Order Canceled/Margin/Rejected
2024-08-12, SELL EXECUTED, Price: 0.77, Cost: 15749.63, Comm 30.80
2024-08-13, SELL EXECUTED, Price: 0.78, Cost: 15749.63, Comm 31.00
2024-08-14, SELL EXECUTED, Price: 0.78, Cost: 15749.63, Comm 31.16
2024-08-15, SELL EXECUTED, Price: 0.76, Cost: 15749.63, Comm 30.48
2024-08-16, SELL EXECUTED, Price: 0.78, Cost: 15749.63, Comm 31.04
2024-08-19, SELL EXECUTED, Price: 0.80, Cost: 15749.63, Comm 31.88
2024-08-28, BUY EXECUTED, Price: 0.74, Cost: 14860.00, Comm 29.72
2024-08-29, BUY EXECUTED, Price: 0.72, Cost: 14440.00, Comm 28.88
2024-08-30, BUY EXECUTED, Price: 0.74, Cost: 14740.00, Comm 29.48
portfolio end value: 106851.96

March 1 to September 1, 10W of the principal, tossed six months earned 6851, yield 6.8%, tsk tsk. How to say, seems to be really a little bit of money ... (In fact, each time the amount of orders on the earnings also have an impact, I adjusted a few times, found that 20,000 may be the highest earnings, the real trade is not going to give me the opportunity to adjust this ...) Also, this strategy to operate every day, to play up may also really full-time, but trading too often cost is also high, the commission is 3000 dollars, trading costs accounted for half of the revenue, or be careful ...)

Most of the methods above are from the book Algorithmic Trading.

When I first read this book, I was so pumped up that I was ready to quit my job and speculate at home full time. Now look again, half a year to earn 6000... I'd rather forget it and move bricks at ease.

----------------------------------------------------------------------

Footnotes

  1. /doushuai/posts/