CoolFace
Apppublic

diegobeyl/backtesting

sourceHugging Faceupdated 8mo agoView on Hugging Face
2likes
run.py39 linesDownload Raw Back to root
1"""
2Backtesting Application Entry Point
3"""
4
5import uvicorn
6import sys
7from pathlib import Path
8
9# Add the parent directory to path for imports
10sys.path.insert(0, str(Path(__file__).parent))
11
12
13def main():
14    """Run the FastAPI application"""
15    print("")
16    print("=" * 60)
17    print("  DONCHIAN STRUCTURAL BACKTESTING SYSTEM")
18    print("=" * 60)
19    print("")
20    print("  Open http://localhost:8000 in your browser")
21    print("  API docs available at http://localhost:8000/docs")
22    print("")
23    print("  Hot-reload enabled: config changes apply automatically")
24    print("=" * 60)
25    print("")
26    
27    uvicorn.run(
28        "api.main:app",
29        host="0.0.0.0",
30        port=8000,
31        reload=True,
32        reload_dirs=[str(Path(__file__).parent)],
33        log_level="info"
34    )
35
36
37if __name__ == "__main__":
38    main()
39