-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrl_position_sizing.py
More file actions
48 lines (41 loc) · 1.02 KB
/
rl_position_sizing.py
File metadata and controls
48 lines (41 loc) · 1.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
"""Deprecated compatibility shim for RL position sizing.
This module has moved to:
- ``src.training.rl.position_sizer``
- ``src.training.rl.environments.trading_env``
"""
from __future__ import annotations
import warnings
from src.training.rl.position_sizer import (
GYM_AVAILABLE,
POSITION_LEVELS,
RLConfig,
RLPositionSizer,
RL_MODEL_PATH,
RL_SCALER_PATH,
SB3_AVAILABLE,
_ensure_gym_imported,
_ensure_sb3_imported,
get_position_sizer,
train_rl_position_sizer,
)
from src.training.rl.environments.trading_env import TradingEnv
warnings.warn(
"Importing from 'rl_position_sizing' is deprecated. "
"Use 'src.training.rl.position_sizer' instead.",
DeprecationWarning,
stacklevel=2,
)
__all__ = [
"GYM_AVAILABLE",
"POSITION_LEVELS",
"RLConfig",
"RLPositionSizer",
"RL_MODEL_PATH",
"RL_SCALER_PATH",
"SB3_AVAILABLE",
"TradingEnv",
"_ensure_gym_imported",
"_ensure_sb3_imported",
"get_position_sizer",
"train_rl_position_sizer",
]