-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Created StrategyBase for further development
- Loading branch information
Jack Song
committed
Jun 9, 2019
1 parent
c06e44f
commit 007786f
Showing
1 changed file
with
59 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,59 @@ | ||
{ | ||
"cells": [ | ||
{ | ||
"cell_type": "code", | ||
"execution_count": 1, | ||
"outputs": [], | ||
"source": "# %%file strategy_base.py\n\nimport six\nfrom abc import ABCMeta, abstractmethod\n\nclass TradeStrategyBase(six.with_metaclass(ABCMeta, object)):\n \"\"\"\n Trading Strategy Abstract Base Class\n \"\"\"\n @abstractmethod\n def trade(self, *args, **kwargs):\n # Base Buy Strategy \n pass\n \n @abstractmethod\n def _evaluate_buying(self, *args, **kwargs):\n # Base Buy Strategy \n pass\n \n @abstractmethod\n def _execute_buying(self, *args, **kwargs):\n # Base Buy Strategy \n pass\n \n @abstractmethod\n def _evaluate_selling(self, *args, **kwargs):\n # Base Buy Strategy \n pass\n \n @abstractmethod\n def _execute_selling(self, *args, **kwargs):\n # Base Sell Strategy\n pass", | ||
"metadata": { | ||
"pycharm": { | ||
"metadata": false, | ||
"name": "#%% Trading Strategy Abstract Base Class\n", | ||
"is_executing": false | ||
} | ||
} | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"outputs": [], | ||
"source": "\n", | ||
"metadata": { | ||
"pycharm": { | ||
"metadata": false, | ||
"name": "#%%\n" | ||
} | ||
} | ||
} | ||
], | ||
"metadata": { | ||
"language_info": { | ||
"codemirror_mode": { | ||
"name": "ipython", | ||
"version": 2 | ||
}, | ||
"file_extension": ".py", | ||
"mimetype": "text/x-python", | ||
"name": "python", | ||
"nbconvert_exporter": "python", | ||
"pygments_lexer": "ipython2", | ||
"version": "2.7.6" | ||
}, | ||
"kernelspec": { | ||
"name": "python3", | ||
"language": "python", | ||
"display_name": "Python 3" | ||
}, | ||
"stem_cell": { | ||
"cell_type": "raw", | ||
"source": "", | ||
"metadata": { | ||
"pycharm": { | ||
"metadata": false | ||
} | ||
} | ||
} | ||
}, | ||
"nbformat": 4, | ||
"nbformat_minor": 0 | ||
} |