bullishpy 0.25.0__py3-none-any.whl → 0.27.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of bullishpy might be problematic. Click here for more details.
- bullish/analysis/backtest.py +2 -1
- bullish/cli.py +9 -0
- {bullishpy-0.25.0.dist-info → bullishpy-0.27.0.dist-info}/METADATA +2 -2
- {bullishpy-0.25.0.dist-info → bullishpy-0.27.0.dist-info}/RECORD +6 -6
- {bullishpy-0.25.0.dist-info → bullishpy-0.27.0.dist-info}/WHEEL +0 -0
- {bullishpy-0.25.0.dist-info → bullishpy-0.27.0.dist-info}/entry_points.txt +0 -0
bullish/analysis/backtest.py
CHANGED
|
@@ -2,6 +2,7 @@ import json
|
|
|
2
2
|
import logging
|
|
3
3
|
import random
|
|
4
4
|
from datetime import date, timedelta
|
|
5
|
+
from io import StringIO
|
|
5
6
|
from typing import TYPE_CHECKING, Optional, Union, List, Dict, Any
|
|
6
7
|
|
|
7
8
|
import numpy as np
|
|
@@ -104,7 +105,7 @@ class BacktestResult(BacktestResultQuery):
|
|
|
104
105
|
data: Dict[str, Any]
|
|
105
106
|
|
|
106
107
|
def to_dataframe(self) -> pd.DataFrame:
|
|
107
|
-
return pd.read_json(json.dumps(self.data)).sort_index()
|
|
108
|
+
return pd.read_json(StringIO(json.dumps(self.data))).sort_index()
|
|
108
109
|
|
|
109
110
|
|
|
110
111
|
class BacktestResults(BaseModel):
|
bullish/cli.py
CHANGED
|
@@ -22,7 +22,14 @@ STREAMLIT_FILE = Path(__file__).parent.joinpath("app", "app.py")
|
|
|
22
22
|
def serve(
|
|
23
23
|
host: str = typer.Option("0.0.0.0", help="Streamlit host"), # noqa: S104
|
|
24
24
|
port: int = typer.Option(8501, help="Streamlit port"),
|
|
25
|
+
env_vars: Path = typer.Option( # noqa: B008
|
|
26
|
+
None, help="Environment variables file"
|
|
27
|
+
),
|
|
25
28
|
) -> None:
|
|
29
|
+
if env_vars:
|
|
30
|
+
env_vars_path = Path(env_vars)
|
|
31
|
+
if env_vars_path.exists():
|
|
32
|
+
load_dotenv(dotenv_path=env_vars_path)
|
|
26
33
|
children: list[subprocess.Popen] = [] # type: ignore
|
|
27
34
|
|
|
28
35
|
def _shutdown(*_: Any) -> None:
|
|
@@ -47,6 +54,8 @@ def serve(
|
|
|
47
54
|
"-m",
|
|
48
55
|
"huey.bin.huey_consumer",
|
|
49
56
|
"bullish.jobs.tasks.huey",
|
|
57
|
+
"--workers",
|
|
58
|
+
"2",
|
|
50
59
|
],
|
|
51
60
|
env=os.environ.copy(),
|
|
52
61
|
)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: bullishpy
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.27.0
|
|
4
4
|
Summary:
|
|
5
5
|
Author: aan
|
|
6
6
|
Author-email: andoludovic.andriamamonjy@gmail.com
|
|
@@ -17,7 +17,7 @@ Requires-Dist: streamlit (>=1.45.1,<2.0.0)
|
|
|
17
17
|
Requires-Dist: streamlit-file-browser (>=3.2.22,<4.0.0)
|
|
18
18
|
Requires-Dist: streamlit-pydantic (>=v0.6.1-rc.3,<0.7.0)
|
|
19
19
|
Requires-Dist: ta-lib (>=0.6.4,<0.7.0)
|
|
20
|
-
Requires-Dist: tickermood (>=0.
|
|
20
|
+
Requires-Dist: tickermood (>=0.11.0,<0.12.0)
|
|
21
21
|
Requires-Dist: vectorbt (>=0.28.0,<0.29.0)
|
|
22
22
|
Description-Content-Type: text/markdown
|
|
23
23
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
bullish/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2
2
|
bullish/analysis/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
3
3
|
bullish/analysis/analysis.py,sha256=9a1j1-Fe0XW5_fiNXtgs7XM_0Rl0mQOWvXQv9nUirdg,22124
|
|
4
|
-
bullish/analysis/backtest.py,sha256=
|
|
4
|
+
bullish/analysis/backtest.py,sha256=x91ek5kOzJHvYq0TmJh1Q8wBDDduIaieE0zDaoZFXew,14325
|
|
5
5
|
bullish/analysis/constants.py,sha256=OpjmrMWHKstoqi314GdJU0vg23IgWqa_rrFU_Lsms0Q,9940
|
|
6
6
|
bullish/analysis/filter.py,sha256=wBVkHhQPfG8wJ0TR3KLo_Bb7cRZFPyHlF4UK2mpG6S0,8495
|
|
7
7
|
bullish/analysis/functions.py,sha256=JSxYCuua_sMGLosN83j0GcY0Ls_gsE4OZLLGInxG9RA,14354
|
|
@@ -10,7 +10,7 @@ bullish/analysis/industry_views.py,sha256=3TwruMdRYtmBC5bRYFptLt18AN9PQSY9d-uWnT
|
|
|
10
10
|
bullish/analysis/predefined_filters.py,sha256=FnEyWcVKlCSlDhE8LHGXGY3tFZmFTnExQmg78BW9ICs,12417
|
|
11
11
|
bullish/app/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
12
12
|
bullish/app/app.py,sha256=rIvz4A0aJu7wGXBSCqO3EBA4QGhV8GPYVOYLOd9WjnY,14253
|
|
13
|
-
bullish/cli.py,sha256=
|
|
13
|
+
bullish/cli.py,sha256=azhVLwOUrmwrtFAJSgva8-UFgNgkepXhjp7DxQNc-yw,2427
|
|
14
14
|
bullish/database/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
15
15
|
bullish/database/alembic/README,sha256=heMzebYwlGhnE8_4CWJ4LS74WoEZjBy-S-mIJRxAEKI,39
|
|
16
16
|
bullish/database/alembic/alembic.ini,sha256=VuwqBJV5ObTyyRNrqv8Xr-TDIRfqPjP9R1mqewYM_xE,3695
|
|
@@ -51,7 +51,7 @@ bullish/jobs/models.py,sha256=S2yvBf69lmt4U-5OU5CjXCMSw0s9Ubh9xkrB3k2qOZo,764
|
|
|
51
51
|
bullish/jobs/tasks.py,sha256=vXPbISYFUZlrYkMVUb7y-g-z0BBi91wQLm8RbYqR4I0,3691
|
|
52
52
|
bullish/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
53
53
|
bullish/utils/checks.py,sha256=Va10_xDVVnxYkOD2hafvyQ-TFV8FQpOkr4huJ7XgpDM,2188
|
|
54
|
-
bullishpy-0.
|
|
55
|
-
bullishpy-0.
|
|
56
|
-
bullishpy-0.
|
|
57
|
-
bullishpy-0.
|
|
54
|
+
bullishpy-0.27.0.dist-info/METADATA,sha256=JqCDumOpMDIjNplta8Bg4BJ20CcKz96fWYmNCb4e89U,830
|
|
55
|
+
bullishpy-0.27.0.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
|
|
56
|
+
bullishpy-0.27.0.dist-info/entry_points.txt,sha256=eaPpmL6vmSBFo0FBtwibCXGqAW4LFJ83whJzT1VjD-0,43
|
|
57
|
+
bullishpy-0.27.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|