-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathtest_logic.py
More file actions
29 lines (23 loc) · 891 Bytes
/
test_logic.py
File metadata and controls
29 lines (23 loc) · 891 Bytes
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
from strategies.manager import StrategyManager
def test_backend():
print("Initializing Manager...")
mgr = StrategyManager()
ticker = "RELIANCE.NS"
print(f"Analyzing {ticker}...")
res = mgr.analyze_ticker(ticker)
print("\n--- RESULTS ---")
print(f"Ticker: {res['ticker']}")
print(f"Price: {res['price']}")
print(f"Summary: {res['summary']}")
for name, data in res['strategies'].items():
print(f"\nStrategy: {name}")
print(f"Status: {data['status']}")
print(f"Signal: {data.get('signal')}")
print(f"Score: {data.get('score')}")
if data['status'] == 'PASS':
print("Passed Reasons:", data.get('details'))
else:
print("Failed Reasons:", data.get('details'))
print("\nDone.")
if __name__ == "__main__":
test_backend()