-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request vnpy#2432 from vnpy/dev
Dev
- Loading branch information
Showing
422 changed files
with
44,821 additions
and
23,950 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
recursive-include vnpy *.ico *.ini *.dll *.so *.pyd *.h *.hpp *.cpp *.a *.dat | ||
recursive-include vnpy *.ico *.ini *.dll *.so *.pyd *.h *.hpp *.cpp *.a *.dat *.pfx |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
{ | ||
"cells": [ | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"#%%\n", | ||
"from datetime import datetime\n", | ||
"\n", | ||
"from vnpy.app.portfolio_strategy import BacktestingEngine\n", | ||
"from vnpy.app.portfolio_strategy.strategies.trend_following_strategy import TrendFollowingStrategy\n", | ||
"from vnpy.trader.constant import Interval" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"#%%\n", | ||
"engine = BacktestingEngine()\n", | ||
"engine.set_parameters(\n", | ||
" vt_symbols=[\"IF888.CFFEX\"],\n", | ||
" interval=Interval.MINUTE,\n", | ||
" start=datetime(2010, 2, 1),\n", | ||
" end=datetime(2020, 4, 30),\n", | ||
" rates={\"IF888.CFFEX\": 0.3/10000},\n", | ||
" slippages={\"IF888.CFFEX\": 0.2},\n", | ||
" sizes={\"IF888.CFFEX\": 300},\n", | ||
" priceticks={\"IF888.CFFEX\": 0.2},\n", | ||
" capital=1_000_000,\n", | ||
")\n", | ||
"engine.add_strategy(TrendFollowingStrategy, {})" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"metadata": { | ||
"scrolled": false | ||
}, | ||
"outputs": [], | ||
"source": [ | ||
"#%%\n", | ||
"engine.load_data()\n", | ||
"engine.run_backtesting()\n", | ||
"df = engine.calculate_result()\n", | ||
"engine.calculate_statistics()\n", | ||
"engine.show_chart()" | ||
] | ||
} | ||
], | ||
"metadata": { | ||
"kernelspec": { | ||
"display_name": "Python 3", | ||
"language": "python", | ||
"name": "python3" | ||
}, | ||
"language_info": { | ||
"codemirror_mode": { | ||
"name": "ipython", | ||
"version": 3 | ||
}, | ||
"file_extension": ".py", | ||
"mimetype": "text/x-python", | ||
"name": "python", | ||
"nbconvert_exporter": "python", | ||
"pygments_lexer": "ipython3", | ||
"version": "3.7.4" | ||
} | ||
}, | ||
"nbformat": 4, | ||
"nbformat_minor": 2 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
six==1.13.0 | ||
wheel | ||
PyQt5 | ||
pyqtgraph | ||
dataclasses; python_version<="3.6" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
__version__ = "2.1.1" | ||
__version__ = "2.1.2" |
Oops, something went wrong.