前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >量化交易(二)

量化交易(二)

作者头像
算法之名
发布2024-09-01 07:57:33
610
发布2024-09-01 07:57:33
举报
文章被收录于专栏:算法之名

量化交易

回测框架

这里我们使用PyAlgoTrade框架.

代码语言:javascript
复制
pip install pyalgotrade
pip install pyalgotrade_tushare
  • 定义数据与策略
代码语言:javascript
复制
from pyalgotrade import strategy
from pyalgotrade.barfeed import quandlfeed
from pyalgotrade_tushare import tools, barfeed

class MyStrategy(strategy.BacktestingStrategy):
    '''
    定义一个自己的策略
    '''
    def __init__(self, feed, instrument):
        '''
        初始化
        :param feed: 数据源
        :param instrument: 股票代码
        '''
        super(MyStrategy, self).__init__(feed)
        self.__instrument = instrument

    def onBars(self, bars):
        '''
        在每个数据源的柱状图上调用
        :param bars:
        :return:
        '''
        bar = bars[self.__instrument]
        # 获取收盘价
        self.info(bar.getClose())

if __name__ == '__main__':
    # 加载数据源,平安银行的历史数据
    instruments = ['000001']
    feeds = tools.build_feed(instruments, 2019, 2023, 'histdata')
    # 用数据源提供的柱状图运行策略
    mystrategy = MyStrategy(feeds, instruments[0])
    mystrategy.run()

运行结果(部分)

代码语言:javascript
复制
2024-08-31 10:18:48,061 tushare [INFO] Creating histdata directory
2024-08-31 10:18:48,062 tushare [INFO] Downloading 000001 2019 to histdata/000001-2019-tushare.csv
本接口即将停止更新,请尽快使用Pro版接口:https://tushare.pro/document/2
2024-08-31 10:18:48,446 tushare [INFO] Downloading 000001 2020 to histdata/000001-2020-tushare.csv
本接口即将停止更新,请尽快使用Pro版接口:https://tushare.pro/document/2
2024-08-31 10:18:48,748 tushare [INFO] Downloading 000001 2021 to histdata/000001-2021-tushare.csv
本接口即将停止更新,请尽快使用Pro版接口:https://tushare.pro/document/2
2024-08-31 10:18:49,100 tushare [INFO] Downloading 000001 2022 to histdata/000001-2022-tushare.csv
本接口即将停止更新,请尽快使用Pro版接口:https://tushare.pro/document/2
2024-08-31 10:18:49,396 tushare [INFO] Downloading 000001 2023 to histdata/000001-2023-tushare.csv
本接口即将停止更新,请尽快使用Pro版接口:https://tushare.pro/document/2
2019-01-02 00:00:00 strategy [INFO] 7.415
2019-01-03 00:00:00 strategy [INFO] 7.505
2019-01-04 00:00:00 strategy [INFO] 7.975
2019-01-07 00:00:00 strategy [INFO] 7.965
2019-01-08 00:00:00 strategy [INFO] 7.885
2019-01-09 00:00:00 strategy [INFO] 8.165
2019-01-10 00:00:00 strategy [INFO] 8.325
2019-01-11 00:00:00 strategy [INFO] 8.425
2019-01-14 00:00:00 strategy [INFO] 8.335
2019-01-15 00:00:00 strategy [INFO] 8.465
2019-01-16 00:00:00 strategy [INFO] 8.705
2019-01-17 00:00:00 strategy [INFO] 8.475
2019-01-18 00:00:00 strategy [INFO] 8.655
2019-01-21 00:00:00 strategy [INFO] 8.565
2019-01-22 00:00:00 strategy [INFO] 8.505
2019-01-23 00:00:00 strategy [INFO] 8.575
2019-01-24 00:00:00 strategy [INFO] 8.745
2019-01-25 00:00:00 strategy [INFO] 9.225
2019-01-28 00:00:00 strategy [INFO] 9.165
2019-01-29 00:00:00 strategy [INFO] 9.225
2019-01-30 00:00:00 strategy [INFO] 9.175
2019-01-31 00:00:00 strategy [INFO] 9.325
2019-02-01 00:00:00 strategy [INFO] 9.425
2019-02-11 00:00:00 strategy [INFO] 9.435
2019-02-12 00:00:00 strategy [INFO] 9.415
2019-02-13 00:00:00 strategy [INFO] 9.605
2019-02-14 00:00:00 strategy [INFO] 9.475
2019-02-15 00:00:00 strategy [INFO] 9.175
2019-02-18 00:00:00 strategy [INFO] 9.585
2019-02-19 00:00:00 strategy [INFO] 9.495
2019-02-20 00:00:00 strategy [INFO] 9.635
2019-02-21 00:00:00 strategy [INFO] 9.585
2019-02-22 00:00:00 strategy [INFO] 9.765
2019-02-25 00:00:00 strategy [INFO] 10.775
2019-02-26 00:00:00 strategy [INFO] 10.425
2019-02-27 00:00:00 strategy [INFO] 10.625
2019-02-28 00:00:00 strategy [INFO] 10.585
2019-03-01 00:00:00 strategy [INFO] 10.985
2019-03-04 00:00:00 strategy [INFO] 11.215
2019-03-05 00:00:00 strategy [INFO] 11.285
2019-03-06 00:00:00 strategy [INFO] 11.305
2019-03-07 00:00:00 strategy [INFO] 10.965
2019-03-08 00:00:00 strategy [INFO] 10.525
2019-03-11 00:00:00 strategy [INFO] 10.545
2019-03-12 00:00:00 strategy [INFO] 10.585
2019-03-13 00:00:00 strategy [INFO] 10.595
2019-03-14 00:00:00 strategy [INFO] 10.655
2019-03-15 00:00:00 strategy [INFO] 10.725
2019-03-18 00:00:00 strategy [INFO] 11.135
2019-03-19 00:00:00 strategy [INFO] 11.015
2019-03-20 00:00:00 strategy [INFO] 10.975
2019-03-21 00:00:00 strategy [INFO] 10.915
2019-03-22 00:00:00 strategy [INFO] 10.815
2019-03-25 00:00:00 strategy [INFO] 10.335
2019-03-26 00:00:00 strategy [INFO] 10.325
2019-03-27 00:00:00 strategy [INFO] 10.605
...

现在我们来获取均线数据

代码语言:javascript
复制
from pyalgotrade import strategy
from pyalgotrade_tushare import tools, barfeed
from pyalgotrade.technical import ma

def safe_round(value, digits):
    '''
    保留小数位
    :param value: 数据
    :param digits: 位数
    :return:
    '''
    if value is not None:
        value = round(value, digits)
    return value

class MyStrategy(strategy.BacktestingStrategy):
    '''
    定义一个自己的策略
    '''
    def __init__(self, feed, instrument):
        '''
        初始化
        :param feed: 数据源
        :param instrument: 股票代码
        '''
        super(MyStrategy, self).__init__(feed)
        # 15日均价
        self.__sma = ma.SMA(feed[instrument].getCloseDataSeries(), 15)
        self.__instrument = instrument

    def onBars(self, bars):
        '''
        在每个数据源的柱状图上调用
        :param bars:
        :return:
        '''
        bar = bars[self.__instrument]
        # 获取收盘价和均价
        self.info("%s %s" % (bar.getClose(), safe_round(self.__sma[-1], 2)))

if __name__ == '__main__':
    # 加载数据源,平安银行的历史数据
    instruments = ['000001']
    feeds = tools.build_feed(instruments, 2019, 2023, 'histdata')
    # 用数据源提供的柱状图运行策略
    mystrategy = MyStrategy(feeds, instruments[0])
    mystrategy.run()

运行结果(部分)

代码语言:javascript
复制
2019-01-02 00:00:00 strategy [INFO] 7.415 None
2019-01-03 00:00:00 strategy [INFO] 7.505 None
2019-01-04 00:00:00 strategy [INFO] 7.975 None
2019-01-07 00:00:00 strategy [INFO] 7.965 None
2019-01-08 00:00:00 strategy [INFO] 7.885 None
2019-01-09 00:00:00 strategy [INFO] 8.165 None
2019-01-10 00:00:00 strategy [INFO] 8.325 None
2019-01-11 00:00:00 strategy [INFO] 8.425 None
2019-01-14 00:00:00 strategy [INFO] 8.335 None
2019-01-15 00:00:00 strategy [INFO] 8.465 None
2019-01-16 00:00:00 strategy [INFO] 8.705 None
2019-01-17 00:00:00 strategy [INFO] 8.475 None
2019-01-18 00:00:00 strategy [INFO] 8.655 None
2019-01-21 00:00:00 strategy [INFO] 8.565 None
2019-01-22 00:00:00 strategy [INFO] 8.505 8.22
2019-01-23 00:00:00 strategy [INFO] 8.575 8.3
2019-01-24 00:00:00 strategy [INFO] 8.745 8.38
2019-01-25 00:00:00 strategy [INFO] 9.225 8.47
2019-01-28 00:00:00 strategy [INFO] 9.165 8.55
2019-01-29 00:00:00 strategy [INFO] 9.225 8.64
2019-01-30 00:00:00 strategy [INFO] 9.175 8.7
2019-01-31 00:00:00 strategy [INFO] 9.325 8.77
2019-02-01 00:00:00 strategy [INFO] 9.425 8.84
2019-02-11 00:00:00 strategy [INFO] 9.435 8.91
2019-02-12 00:00:00 strategy [INFO] 9.415 8.97
2019-02-13 00:00:00 strategy [INFO] 9.605 9.03
2019-02-14 00:00:00 strategy [INFO] 9.475 9.1
2019-02-15 00:00:00 strategy [INFO] 9.175 9.14
2019-02-18 00:00:00 strategy [INFO] 9.585 9.2
2019-02-19 00:00:00 strategy [INFO] 9.495 9.27
2019-02-20 00:00:00 strategy [INFO] 9.635 9.34
2019-02-21 00:00:00 strategy [INFO] 9.585 9.4
2019-02-22 00:00:00 strategy [INFO] 9.765 9.43
2019-02-25 00:00:00 strategy [INFO] 10.775 9.54
2019-02-26 00:00:00 strategy [INFO] 10.425 9.62
2019-02-27 00:00:00 strategy [INFO] 10.625 9.72
2019-02-28 00:00:00 strategy [INFO] 10.585 9.8
2019-03-01 00:00:00 strategy [INFO] 10.985 9.9
2019-03-04 00:00:00 strategy [INFO] 11.215 10.02
2019-03-05 00:00:00 strategy [INFO] 11.285 10.15
2019-03-06 00:00:00 strategy [INFO] 11.305 10.26
2019-03-07 00:00:00 strategy [INFO] 10.965 10.36
2019-03-08 00:00:00 strategy [INFO] 10.525 10.45
2019-03-11 00:00:00 strategy [INFO] 10.545 10.51
2019-03-12 00:00:00 strategy [INFO] 10.585 10.59
2019-03-13 00:00:00 strategy [INFO] 10.595 10.65
2019-03-14 00:00:00 strategy [INFO] 10.655 10.72
2019-03-15 00:00:00 strategy [INFO] 10.725 10.79
2019-03-18 00:00:00 strategy [INFO] 11.135 10.81
2019-03-19 00:00:00 strategy [INFO] 11.015 10.85
2019-03-20 00:00:00 strategy [INFO] 10.975 10.87
2019-03-21 00:00:00 strategy [INFO] 10.915 10.89
2019-03-22 00:00:00 strategy [INFO] 10.815 10.88
2019-03-25 00:00:00 strategy [INFO] 10.335 10.82
...
  • 模拟交易与回测
代码语言:javascript
复制
from pyalgotrade import strategy
from pyalgotrade_tushare import tools, barfeed
from pyalgotrade.technical import ma

def safe_round(value, digits):
    '''
    保留小数位
    :param value: 数据
    :param digits: 位数
    :return:
    '''
    if value is not None:
        value = round(value, digits)
    return value

class MyStrategy(strategy.BacktestingStrategy):
    '''
    定义一个自己的策略
    '''
    def __init__(self, feed, instrument, smaPeriod):
        '''
        初始化
        :param feed: 数据源
        :param instrument: 股票代码
        :param smaPeriod: 均线周期时间
        '''
        # 添加行情数据以及买入金额
        super(MyStrategy, self).__init__(feed, 10000)
        self.__position = None
        self.__instrument = instrument
        # 使用调整后的收盘价而不是常规收盘价
        # self.setUseAdjustedValues(True)
        # smaPeriod日均价
        self.__sma = ma.SMA(feed[instrument].getPriceDataSeries(), smaPeriod)

    def onEnterOk(self, position):
        '''
        操作成功时执行
        :param position:
        :return:
        '''
        execInfo = position.getEntryOrder().getExecutionInfo()
        self.info("BUY at ¥%.2f" % (execInfo.getPrice()))

    def onEntryCanceled(self, position):
        self.__position = None

    def onExitOk(self, position):
        execInfo = position.getExitOrder().getExecutionInfo()
        self.info("SELL at ¥%.2f" % (execInfo.getPrice()))
        self.__position = None

    def onExitCanceled(self, position):
        self.__position.exitMarket()

    def onBars(self, bars):
        '''
        在每个数据源的柱状图上调用
        :param bars:
        :return:
        '''
        # 等待足够的日期数可以计算均价
        if self.__sma[-1] is None:
            return
        bar = bars[self.__instrument]
        # 如果头寸未开仓,检查我们是否应建立多头头寸。
        if self.__position is None:
            if bar.getPrice() > self.__sma[-1]:
                # 输入买入100股的市场订单。该订单在取消前一直有效。
                self.__position = self.enterLong(self.__instrument, 100, True)
        # 检查我们是否必须退出该头寸。
        elif bar.getPrice() < self.__sma[-1] and not self.__position.exitActive():
            self.__position.exitMarket()

def run_strategy(smsPeriod):
    instruments = ['000001']
    feeds = tools.build_feed(instruments, 2019, 2023, 'histdata')
    mystrategy = MyStrategy(feeds, instruments[0], smsPeriod)
    mystrategy.run()
    print('最终收益: ¥%.2f' % mystrategy.getBroker().getEquity())

if __name__ == '__main__':

    run_strategy(15)

运行结果

代码语言:javascript
复制
2019-01-23 00:00:00 strategy [INFO] BUY at ¥8.52
2019-03-13 00:00:00 strategy [INFO] SELL at ¥10.56
2019-03-19 00:00:00 strategy [INFO] BUY at ¥11.14
2019-03-25 00:00:00 strategy [INFO] SELL at ¥10.62
2019-04-01 00:00:00 strategy [INFO] BUY at ¥11.05
2019-04-29 00:00:00 strategy [INFO] SELL at ¥12.12
2019-04-30 00:00:00 strategy [INFO] BUY at ¥12.21
2019-05-06 00:00:00 strategy [INFO] SELL at ¥11.32
2019-05-29 00:00:00 strategy [INFO] BUY at ¥10.59
2019-05-30 00:00:00 strategy [INFO] SELL at ¥10.54
2019-06-11 00:00:00 strategy [INFO] BUY at ¥10.56
2019-07-09 00:00:00 strategy [INFO] SELL at ¥12.00
2019-07-15 00:00:00 strategy [INFO] BUY at ¥12.40
2019-07-17 00:00:00 strategy [INFO] SELL at ¥12.07
2019-07-22 00:00:00 strategy [INFO] BUY at ¥12.33
2019-07-24 00:00:00 strategy [INFO] SELL at ¥12.24
2019-07-25 00:00:00 strategy [INFO] BUY at ¥12.29
2019-08-05 00:00:00 strategy [INFO] SELL at ¥11.97
2019-08-09 00:00:00 strategy [INFO] BUY at ¥12.92
2019-08-23 00:00:00 strategy [INFO] SELL at ¥12.74
2019-08-26 00:00:00 strategy [INFO] BUY at ¥12.79
2019-08-27 00:00:00 strategy [INFO] SELL at ¥12.73
2019-09-06 00:00:00 strategy [INFO] BUY at ¥13.08
2019-09-18 00:00:00 strategy [INFO] SELL at ¥12.61
2019-09-20 00:00:00 strategy [INFO] BUY at ¥13.32
2019-10-24 00:00:00 strategy [INFO] SELL at ¥14.87
2019-10-25 00:00:00 strategy [INFO] BUY at ¥15.15
2019-10-29 00:00:00 strategy [INFO] SELL at ¥15.06
2019-10-30 00:00:00 strategy [INFO] BUY at ¥15.17
2019-10-31 00:00:00 strategy [INFO] SELL at ¥14.79
2019-11-04 00:00:00 strategy [INFO] BUY at ¥15.35
2019-11-11 00:00:00 strategy [INFO] SELL at ¥14.87
2019-12-12 00:00:00 strategy [INFO] BUY at ¥14.03
2020-01-16 00:00:00 strategy [INFO] SELL at ¥14.89
2020-02-18 00:00:00 strategy [INFO] BUY at ¥13.70
2020-02-27 00:00:00 strategy [INFO] SELL at ¥13.33
2020-02-28 00:00:00 strategy [INFO] BUY at ¥13.22
2020-03-02 00:00:00 strategy [INFO] SELL at ¥12.92
2020-03-06 00:00:00 strategy [INFO] BUY at ¥13.55
2020-03-09 00:00:00 strategy [INFO] SELL at ¥13.08
2020-04-08 00:00:00 strategy [INFO] BUY at ¥11.25
2020-04-10 00:00:00 strategy [INFO] SELL at ¥11.13
2020-04-13 00:00:00 strategy [INFO] BUY at ¥11.04
2020-04-14 00:00:00 strategy [INFO] SELL at ¥11.02
2020-04-15 00:00:00 strategy [INFO] BUY at ¥11.23
2020-04-17 00:00:00 strategy [INFO] SELL at ¥11.14
2020-04-20 00:00:00 strategy [INFO] BUY at ¥11.23
2020-05-15 00:00:00 strategy [INFO] SELL at ¥11.76
2020-06-02 00:00:00 strategy [INFO] BUY at ¥11.88
2020-06-12 00:00:00 strategy [INFO] SELL at ¥11.49
2020-07-02 00:00:00 strategy [INFO] BUY at ¥11.67
2020-07-17 00:00:00 strategy [INFO] SELL at ¥12.76
2020-07-21 00:00:00 strategy [INFO] BUY at ¥13.27
2020-07-22 00:00:00 strategy [INFO] SELL at ¥13.08
2020-08-05 00:00:00 strategy [INFO] BUY at ¥12.41
2020-08-06 00:00:00 strategy [INFO] SELL at ¥12.41
2020-08-07 00:00:00 strategy [INFO] BUY at ¥12.39
2020-08-10 00:00:00 strategy [INFO] SELL at ¥12.26
2020-08-11 00:00:00 strategy [INFO] BUY at ¥12.56
2020-08-27 00:00:00 strategy [INFO] SELL at ¥12.99
2020-08-31 00:00:00 strategy [INFO] BUY at ¥13.89
2020-09-25 00:00:00 strategy [INFO] SELL at ¥13.79
2020-10-13 00:00:00 strategy [INFO] BUY at ¥14.49
2020-11-06 00:00:00 strategy [INFO] SELL at ¥16.30
2020-11-10 00:00:00 strategy [INFO] BUY at ¥16.59
2020-11-12 00:00:00 strategy [INFO] SELL at ¥16.40
2020-11-18 00:00:00 strategy [INFO] BUY at ¥16.37
2020-12-08 00:00:00 strategy [INFO] SELL at ¥17.51
2020-12-29 00:00:00 strategy [INFO] BUY at ¥17.46
2021-01-05 00:00:00 strategy [INFO] SELL at ¥16.99
2021-01-07 00:00:00 strategy [INFO] BUY at ¥18.11
2021-02-23 00:00:00 strategy [INFO] SELL at ¥20.97
2021-03-19 00:00:00 strategy [INFO] BUY at ¥20.12
2021-03-22 00:00:00 strategy [INFO] SELL at ¥19.14
2021-03-30 00:00:00 strategy [INFO] BUY at ¥19.97
2021-04-12 00:00:00 strategy [INFO] SELL at ¥20.10
2021-04-21 00:00:00 strategy [INFO] BUY at ¥20.89
2021-05-14 00:00:00 strategy [INFO] SELL at ¥21.91
2021-05-17 00:00:00 strategy [INFO] BUY at ¥21.92
2021-05-25 00:00:00 strategy [INFO] SELL at ¥22.31
2021-05-26 00:00:00 strategy [INFO] BUY at ¥23.41
2021-06-03 00:00:00 strategy [INFO] SELL at ¥22.49
2021-06-07 00:00:00 strategy [INFO] BUY at ¥23.25
2021-06-11 00:00:00 strategy [INFO] SELL at ¥23.08
2021-07-02 00:00:00 strategy [INFO] BUY at ¥21.49
2021-07-05 00:00:00 strategy [INFO] SELL at ¥20.46
2021-07-07 00:00:00 strategy [INFO] BUY at ¥21.45
2021-07-08 00:00:00 strategy [INFO] SELL at ¥21.55
2021-08-10 00:00:00 strategy [INFO] BUY at ¥17.86
2021-08-26 00:00:00 strategy [INFO] SELL at ¥17.97
2021-09-08 00:00:00 strategy [INFO] BUY at ¥18.01
2021-09-22 00:00:00 strategy [INFO] SELL at ¥16.64
2021-10-11 00:00:00 strategy [INFO] BUY at ¥17.77
2021-11-01 00:00:00 strategy [INFO] SELL at ¥18.10
2021-11-22 00:00:00 strategy [INFO] BUY at ¥16.80
2021-11-24 00:00:00 strategy [INFO] SELL at ¥16.54
2021-12-07 00:00:00 strategy [INFO] BUY at ¥17.07
2021-12-15 00:00:00 strategy [INFO] SELL at ¥16.28
2022-01-10 00:00:00 strategy [INFO] BUY at ¥16.06
2022-01-13 00:00:00 strategy [INFO] SELL at ¥15.68
2022-01-21 00:00:00 strategy [INFO] BUY at ¥16.22
2022-01-26 00:00:00 strategy [INFO] SELL at ¥15.72
2022-02-09 00:00:00 strategy [INFO] BUY at ¥15.69
2022-02-15 00:00:00 strategy [INFO] SELL at ¥15.27
2022-02-21 00:00:00 strategy [INFO] BUY at ¥15.43
2022-02-22 00:00:00 strategy [INFO] SELL at ¥15.08
2022-03-23 00:00:00 strategy [INFO] BUY at ¥13.88
2022-04-21 00:00:00 strategy [INFO] SELL at ¥14.54
2022-04-25 00:00:00 strategy [INFO] BUY at ¥14.44
2022-04-26 00:00:00 strategy [INFO] SELL at ¥13.65
2022-05-23 00:00:00 strategy [INFO] BUY at ¥13.84
2022-05-25 00:00:00 strategy [INFO] SELL at ¥13.20
2022-06-10 00:00:00 strategy [INFO] BUY at ¥13.03
2022-06-14 00:00:00 strategy [INFO] SELL at ¥12.48
2022-06-16 00:00:00 strategy [INFO] BUY at ¥13.51
2022-06-23 00:00:00 strategy [INFO] SELL at ¥12.86
2022-06-28 00:00:00 strategy [INFO] BUY at ¥13.24
2022-07-07 00:00:00 strategy [INFO] SELL at ¥13.31
2022-08-18 00:00:00 strategy [INFO] BUY at ¥11.48
2022-08-19 00:00:00 strategy [INFO] SELL at ¥11.27
2022-08-22 00:00:00 strategy [INFO] BUY at ¥11.58
2022-09-07 00:00:00 strategy [INFO] SELL at ¥11.42
2022-09-13 00:00:00 strategy [INFO] BUY at ¥11.88
2022-09-19 00:00:00 strategy [INFO] SELL at ¥11.54
2022-11-08 00:00:00 strategy [INFO] BUY at ¥9.89
2022-12-20 00:00:00 strategy [INFO] SELL at ¥11.97
2022-12-29 00:00:00 strategy [INFO] BUY at ¥12.07
2022-12-30 00:00:00 strategy [INFO] SELL at ¥12.04
2023-01-03 00:00:00 strategy [INFO] BUY at ¥12.20
2023-02-02 00:00:00 strategy [INFO] SELL at ¥13.74
2023-02-21 00:00:00 strategy [INFO] BUY at ¥13.06
2023-02-27 00:00:00 strategy [INFO] SELL at ¥12.75
2023-03-02 00:00:00 strategy [INFO] BUY at ¥13.13
2023-03-07 00:00:00 strategy [INFO] SELL at ¥12.85
2023-04-11 00:00:00 strategy [INFO] BUY at ¥11.70
2023-04-12 00:00:00 strategy [INFO] SELL at ¥11.58
2023-04-17 00:00:00 strategy [INFO] BUY at ¥11.66
2023-04-24 00:00:00 strategy [INFO] SELL at ¥11.48
2023-05-05 00:00:00 strategy [INFO] BUY at ¥11.78
2023-05-15 00:00:00 strategy [INFO] SELL at ¥11.68
2023-05-16 00:00:00 strategy [INFO] BUY at ¥11.80
2023-05-17 00:00:00 strategy [INFO] SELL at ¥11.58
2023-06-09 00:00:00 strategy [INFO] BUY at ¥11.06
2023-06-12 00:00:00 strategy [INFO] SELL at ¥10.82
2023-06-16 00:00:00 strategy [INFO] BUY at ¥10.89
2023-06-20 00:00:00 strategy [INFO] SELL at ¥10.72
2023-07-04 00:00:00 strategy [INFO] BUY at ¥10.74
2023-07-06 00:00:00 strategy [INFO] SELL at ¥10.58
2023-07-14 00:00:00 strategy [INFO] BUY at ¥10.71
2023-07-19 00:00:00 strategy [INFO] SELL at ¥10.51
2023-07-20 00:00:00 strategy [INFO] BUY at ¥10.61
2023-07-25 00:00:00 strategy [INFO] SELL at ¥10.73
2023-07-26 00:00:00 strategy [INFO] BUY at ¥10.93
2023-08-14 00:00:00 strategy [INFO] SELL at ¥11.04
2023-09-05 00:00:00 strategy [INFO] BUY at ¥10.78
2023-09-08 00:00:00 strategy [INFO] SELL at ¥10.56
2023-09-12 00:00:00 strategy [INFO] BUY at ¥10.63
2023-09-13 00:00:00 strategy [INFO] SELL at ¥10.57
2023-11-07 00:00:00 strategy [INFO] BUY at ¥9.94
2023-11-09 00:00:00 strategy [INFO] SELL at ¥9.74
2023-12-29 00:00:00 strategy [INFO] BUY at ¥8.70
最终收益: ¥10176.50
本文参与 腾讯云自媒体同步曝光计划,分享自作者个人站点/博客。
原始发表:2024-09-01,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体同步曝光计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档