.. _demo: 交易策略 ==================================================== .. contents:: 目录 Aberration 策略 (难度:初级) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 策略说明 https://www.shinnytech.com/blog/aberration/ .. literalinclude:: ../../tqsdk/demo/example/aberration.py :language: python Doublema 双均线策略 (难度:初级) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ .. literalinclude:: ../../tqsdk/demo/example/doublema.py :language: python 价格动量策略 (难度:初级) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 策略说明 https://www.shinnytech.com/blog/momentum-strategy/ .. literalinclude:: ../../tqsdk/demo/example/momentum.py :language: python 自动扶梯策略 (难度:初级) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 策略说明 https://www.shinnytech.com/blog/escalator/ .. literalinclude:: ../../tqsdk/demo/example/escalator.py :language: python 菲阿里四价 策略 (难度:初级) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 策略说明 https://www.shinnytech.com/blog/fairy-four-price/ .. literalinclude:: ../../tqsdk/demo/example/fairy_four_price.py :language: python R-Breaker 交易策略 - 隔夜留仓 (难度:初级) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 策略说明 https://www.shinnytech.com/blog/r-breaker/ .. literalinclude:: ../../tqsdk/demo/example/rbreaker.py :language: python R-Breaker 交易策略 - 非隔夜留仓 (难度:初级) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 策略说明 https://www.shinnytech.com/blog/r-breaker/ .. literalinclude:: ../../tqsdk/demo/example/rbreaker2.py :language: python Dual Thrust 策略 (难度:中级) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 策略说明 https://www.shinnytech.com/blog/dual-thrust/ .. literalinclude:: ../../tqsdk/demo/example/dualthrust.py :language: python 网格交易策略 (难度:中级) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 策略说明 https://www.shinnytech.com/blog/grid-trading/ .. literalinclude:: ../../tqsdk/demo/example/gridtrading.py :language: python 网格交易策略 - 异步代码 (难度:中级) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 策略说明 https://www.shinnytech.com/blog/grid-trading/ .. literalinclude:: ../../tqsdk/demo/example/gridtrading_async.py :language: python 随机森林 (难度:中级) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ .. literalinclude:: ../../tqsdk/demo/example/random_forest.py :language: python 海龟交易策略 (难度:中级) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 策略说明 https://www.shinnytech.com/blog/turtle/ .. literalinclude:: ../../tqsdk/demo/example/turtle.py :language: python Volume Weighted Average Price 策略 (难度:高级) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 策略说明 https://www.shinnytech.com/blog/vwap/ .. literalinclude:: ../../tqsdk/demo/example/vwap.py :language: python