-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Add algorithm trading example. #1587
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
return spaces.Discrete(len(self.action_values)) | ||
|
||
def interpret(self, state: SAATState, action: int) -> str: | ||
assert 0 <= action < len(self.action_values) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
state is unused here
@@ -0,0 +1,62 @@ | |||
simulator: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add readme like this:
examples/rl_order_execution/README.md
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
class Task: """ stock_id : str cash : float start_time : pd.Timestamp closed start time for order trading end_time : pd.Timestamp closed end time for order trading factor : float presents the weight factor assigned in Exchange() """ stock_id: str cash: float start_time: pd.Timestamp end_time: pd.Timestampclass OrderHelper: """
qlib/rl/algorithm_trading/init.pyCopy file name to clipboard+25Lines changed: 25 additions & 0 deletionsViewedComment on this fileOriginal file line numberDiff line numberDiff line change@@ -0,0 +1,25 @@# Copyright (c) Microsoft Corporation.# Licensed under the MIT License.from .interpreter import ( FullHistoryATStateInterpreter, CategoricalATActionInterpreter,)from .network import Recurrentfrom .policy import AllOne, PPOfrom .reward import LongShortRewardfrom .simulator_simple import SingleAssetAlgorithmTradingSimplefrom .state import SAATMetrics, SAATState__all__ = [ "FullHistoryATStateInterpreter", "CategoricalATActionInterpreter", "Recurrent", "AllOne", "PPO", "LongShortReward", "SingleAssetAlgorithmTradingSimple", "SAATMetrics", "SAATState",
No description provided.