openclaw-stock-analysis 0.2.1 → 0.2.5
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.
- package/LICENSE +21 -0
- package/README.md +2 -2
- package/dist/index.js +170 -23
- package/index.ts +184 -26
- package/openclaw.plugin.json +10 -1
- package/package.json +1 -1
- package/scripts/ci-resolve-llm-host.mjs +29 -0
- package/scripts/setup-python.mjs +7 -9
- package/skills/event-driven/SKILL.md +6 -0
- package/skills/growth-quality/SKILL.md +6 -0
- package/skills/hot-theme/SKILL.md +3 -2
- package/skills/stock-analysis/SKILL.md +22 -0
- package/skills/stock-screener/SKILL.md +19 -1
- package/skills/strategy-backtest/SKILL.md +11 -5
- package/strategies/examples/bottom_volume.yaml +5 -0
- package/strategies/examples/box_oscillation.yaml +5 -0
- package/strategies/examples/bull_trend.yaml +11 -3
- package/strategies/examples/dragon_head.yaml +4 -2
- package/strategies/examples/emotion_cycle.yaml +5 -0
- package/strategies/examples/ma_crossover.yaml +10 -3
- package/strategies/examples/rsi_oversold.yaml +5 -0
- package/strategies/examples/shrink_pullback.yaml +7 -1
- package/strategies/examples/volume_breakout.yaml +7 -1
- package/tools/_cache.py +61 -0
- package/tools/_subproc.py +49 -0
- package/tools/alert_rules.py +19 -9
- package/tools/anomaly_detect.py +24 -35
- package/tools/backtest.py +180 -100
- package/tools/capabilities.py +13 -5
- package/tools/diagnostics.py +12 -6
- package/tools/gather.py +13 -9
- package/tools/import_parser.py +2 -5
- package/tools/market_regime.py +27 -35
- package/tools/market_review.py +56 -9
- package/tools/name_resolver.py +2 -5
- package/tools/pattern.py +2 -5
- package/tools/position_context.py +2 -5
- package/tools/report_renderer.py +10 -6
- package/tools/requirements.txt +2 -1
- package/tools/risk_screening.py +29 -23
- package/tools/screener.py +80 -18
- package/tools/search_intel.py +5 -13
- package/tools/signal_tracker.py +2 -6
- package/tools/stock_data.py +612 -177
- package/tools/technical.py +136 -40
- package/tools/trading_calendar.py +78 -18
- package/tools/value_data.py +1368 -0
- package/tools/volume_analysis.py +2 -5
- package/tools/watchlist.py +2 -5
- package/tools/watchlist_context.py +2 -5
package/tools/volume_analysis.py
CHANGED
|
@@ -10,6 +10,7 @@ import numpy as np
|
|
|
10
10
|
|
|
11
11
|
sys.path.insert(0, str(Path(__file__).resolve().parent))
|
|
12
12
|
|
|
13
|
+
from _subproc import utf8_stdio # noqa: E402
|
|
13
14
|
from technical import fetch_kline, to_dataframe # noqa: E402
|
|
14
15
|
|
|
15
16
|
|
|
@@ -150,9 +151,5 @@ def main():
|
|
|
150
151
|
|
|
151
152
|
|
|
152
153
|
if __name__ == "__main__":
|
|
153
|
-
|
|
154
|
-
# Chinese text these tools emit — force UTF-8 so stdout never crashes there.
|
|
155
|
-
for _s in (sys.stdout, sys.stderr):
|
|
156
|
-
if hasattr(_s, "reconfigure"):
|
|
157
|
-
_s.reconfigure(encoding="utf-8")
|
|
154
|
+
utf8_stdio()
|
|
158
155
|
main()
|
package/tools/watchlist.py
CHANGED
|
@@ -8,6 +8,7 @@ from concurrent.futures import ThreadPoolExecutor, as_completed
|
|
|
8
8
|
from pathlib import Path
|
|
9
9
|
|
|
10
10
|
sys.path.insert(0, str(Path(__file__).resolve().parent))
|
|
11
|
+
from _subproc import utf8_stdio
|
|
11
12
|
from gather import gather_analysis
|
|
12
13
|
|
|
13
14
|
|
|
@@ -58,9 +59,5 @@ def main():
|
|
|
58
59
|
|
|
59
60
|
|
|
60
61
|
if __name__ == "__main__":
|
|
61
|
-
|
|
62
|
-
# Chinese text these tools emit — force UTF-8 so stdout never crashes there.
|
|
63
|
-
for _s in (sys.stdout, sys.stderr):
|
|
64
|
-
if hasattr(_s, "reconfigure"):
|
|
65
|
-
_s.reconfigure(encoding="utf-8")
|
|
62
|
+
utf8_stdio()
|
|
66
63
|
main()
|
|
@@ -14,6 +14,7 @@ from pathlib import Path
|
|
|
14
14
|
|
|
15
15
|
sys.path.insert(0, str(Path(__file__).resolve().parent))
|
|
16
16
|
from _subproc import run_tool as _run_json # noqa: E402
|
|
17
|
+
from _subproc import utf8_stdio
|
|
17
18
|
from stock_data import detect_market # noqa: E402
|
|
18
19
|
from watchlist import analyze_watchlist # noqa: E402
|
|
19
20
|
|
|
@@ -150,9 +151,5 @@ def main():
|
|
|
150
151
|
|
|
151
152
|
|
|
152
153
|
if __name__ == "__main__":
|
|
153
|
-
|
|
154
|
-
# Chinese text these tools emit — force UTF-8 so stdout never crashes there.
|
|
155
|
-
for _s in (sys.stdout, sys.stderr):
|
|
156
|
-
if hasattr(_s, "reconfigure"):
|
|
157
|
-
_s.reconfigure(encoding="utf-8")
|
|
154
|
+
utf8_stdio()
|
|
158
155
|
main()
|