59 lines
1.7 KiB
Python
59 lines
1.7 KiB
Python
"""
|
||
setup.py for FuturesTradingAI
|
||
|
||
This script sets up the package installation, including compilation of performance‑critical C modules.
|
||
It also ensures that NumPy headers are available and adds the IBKR API package (ibapi) to the dependencies.
|
||
"""
|
||
|
||
import os
|
||
from setuptools import setup, Extension
|
||
from setuptools.command.build_ext import build_ext
|
||
import numpy
|
||
|
||
# Custom build_ext command (can be extended for platform-specific flags)
|
||
class BuildFastIndicators(build_ext):
|
||
def build_extension(self, ext):
|
||
build_ext.build_extension(self, ext)
|
||
|
||
# Define the C extension module for fast technical indicator computations.
|
||
fast_indicators_module = Extension(
|
||
'fast_indicators', # Name of the generated module
|
||
sources=['src/c_modules/fast_indicators.c'], # Path to the C source file
|
||
extra_compile_args=[], # Extra compiler flags, if needed
|
||
include_dirs=[numpy.get_include()] # Add NumPy include directory
|
||
)
|
||
|
||
setup(
|
||
name='FuturesTradingAI',
|
||
version='0.1.0',
|
||
description='Hierarchical Learning for Live /MES Futures Trading',
|
||
author='Your Name',
|
||
author_email='your.email@example.com',
|
||
packages=[
|
||
'src',
|
||
'src.data',
|
||
'src.models',
|
||
'src.trading',
|
||
'src.api',
|
||
'src.utils'
|
||
],
|
||
ext_modules=[fast_indicators_module],
|
||
cmdclass={'build_ext': BuildFastIndicators},
|
||
install_requires=[
|
||
'tensorflow',
|
||
'gym',
|
||
'stable-baselines3',
|
||
'optuna',
|
||
'numpy',
|
||
'pandas',
|
||
'scikit-learn',
|
||
'joblib',
|
||
'flask',
|
||
'psutil',
|
||
'GPUtil',
|
||
'ibapi' # or "ib_insync" if you prefer an easier-to-use interface for IBKR.
|
||
],
|
||
python_requires='>=3.7'
|
||
)
|
||
|