Updating new attempt

This commit is contained in:
2025-04-12 20:49:03 +00:00
parent 9f63656268
commit 50a245056c
63 changed files with 3315 additions and 0 deletions

58
src/MidasHL/setup.py Normal file
View File

@@ -0,0 +1,58 @@
"""
setup.py for FuturesTradingAI
This script sets up the package installation, including compilation of performancecritical 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'
)