Skip to content

A trading agent AI is an artificial intelligence system that uses computational intelligence methods such as machine learning and deep reinforcement learning to automatically discover, implement, and fine-tune strategies for autonomous adaptive automated trading in financial markets

License

Notifications You must be signed in to change notification settings

MiChaelinzo/Trading-Agent-

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

13 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐ŸŒƒ NETRUNNER TRADING PROTOCOL v2.077 ๐ŸŒƒ

 โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•—โ–ˆโ–ˆโ•—   โ–ˆโ–ˆโ•—โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•— โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•—โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•— โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•—โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•—  โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•— โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•— โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•—โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•— 
โ–ˆโ–ˆโ•”โ•โ•โ•โ•โ•โ•šโ–ˆโ–ˆโ•— โ–ˆโ–ˆโ•”โ•โ–ˆโ–ˆโ•”โ•โ•โ–ˆโ–ˆโ•—โ–ˆโ–ˆโ•”โ•โ•โ•โ•โ•โ–ˆโ–ˆโ•”โ•โ•โ–ˆโ–ˆโ•—โ•šโ•โ•โ–ˆโ–ˆโ•”โ•โ•โ•โ–ˆโ–ˆโ•”โ•โ•โ–ˆโ–ˆโ•—โ–ˆโ–ˆโ•”โ•โ•โ–ˆโ–ˆโ•—โ–ˆโ–ˆโ•”โ•โ•โ–ˆโ–ˆโ•—โ–ˆโ–ˆโ•”โ•โ•โ•โ•โ•โ–ˆโ–ˆโ•”โ•โ•โ–ˆโ–ˆโ•—
โ–ˆโ–ˆโ•‘      โ•šโ–ˆโ–ˆโ–ˆโ–ˆโ•”โ• โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•”โ•โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•—  โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•”โ•   โ–ˆโ–ˆโ•‘   โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•”โ•โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ•‘  โ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•—  โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•”โ•
โ–ˆโ–ˆโ•‘       โ•šโ–ˆโ–ˆโ•”โ•  โ–ˆโ–ˆโ•”โ•โ•โ–ˆโ–ˆโ•—โ–ˆโ–ˆโ•”โ•โ•โ•  โ–ˆโ–ˆโ•”โ•โ•โ–ˆโ–ˆโ•—   โ–ˆโ–ˆโ•‘   โ–ˆโ–ˆโ•”โ•โ•โ–ˆโ–ˆโ•—โ–ˆโ–ˆโ•”โ•โ•โ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ•‘  โ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ•”โ•โ•โ•  โ–ˆโ–ˆโ•”โ•โ•โ–ˆโ–ˆโ•—
โ•šโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•—   โ–ˆโ–ˆโ•‘   โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•”โ•โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•—โ–ˆโ–ˆโ•‘  โ–ˆโ–ˆโ•‘   โ–ˆโ–ˆโ•‘   โ–ˆโ–ˆโ•‘  โ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ•‘  โ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•”โ•โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•—โ–ˆโ–ˆโ•‘  โ–ˆโ–ˆโ•‘
 โ•šโ•โ•โ•โ•โ•โ•   โ•šโ•โ•   โ•šโ•โ•โ•โ•โ•โ• โ•šโ•โ•โ•โ•โ•โ•โ•โ•šโ•โ•  โ•šโ•โ•   โ•šโ•โ•   โ•šโ•โ•  โ•šโ•โ•โ•šโ•โ•  โ•šโ•โ•โ•šโ•โ•โ•โ•โ•โ• โ•šโ•โ•โ•โ•โ•โ•โ•โ•šโ•โ•  โ•šโ•โ•
                    [ NIGHT CITY MARKET EXPLOITATION SYSTEM ]

"In 2077, what makes someone a successful trader? Getting rich." โ€” V, probably

Powered by Arasaka Tech NetRunner Certified ICE Breaker


๐Ÿ”ฎ OVERVIEW | PROGRAM BRIEFING

Choom, welcome to the most preem stock trading ICE-breaker this side of Night City. This neural network runs hotter than a Militech shard, trained using Deep Reinforcement Learning (Deep Q-Learning) to hack the corpo markets and extract maximum eddies.

Implementation is delta-grade โ€” clean, minimal, and optimized for those chooms who want to understand the tech behind the chrome.


๐Ÿ’€ INTRODUCTION | JACKING IN

In the dark future of automated trading, Reinforcement Learning is the closest thing to true machine consciousness. These algorithms learn like street samurai โ€” through trial, error, and a whole lot of flatlined trades.

The beauty? This technique adapts to any market situation that can be described as a Markovian process โ€” which in corpo-speak means: "The future depends only on the present, not the past."

๐Ÿ’ก NetRunner Tip: Traditional supervised learning is like following a corpo playbook. RL is like being a solo โ€” you learn what works through experience on the streets.


โšก APPROACH | COMBAT ALGORITHMS

This daemon utilizes Model-free Reinforcement Learning via Deep Q-Learning โ€” think of it as installing a Sandevistan for your trading decisions.

The Loop:

[JACK IN] โ†’ Observe market state โ†’ Execute action (BUY/SELL/HOLD) โ†’ 
Receive reward signal โ†’ Update neural weights โ†’ [REPEAT]

๐Ÿ”ง INSTALLED CYBERWARE (Implemented Features)

  • ๐Ÿง  Vanilla DQN โ€” Base neural implant
  • ๐ŸŽฏ DQN with Fixed Target Distribution โ€” Stabilized targeting system
  • ๐Ÿ”„ Double DQN โ€” Dual-core processing for better value estimation
  • โšก Batch Prediction โ€” Overclocked training speed
  • ๐Ÿ“Š Prioritized Experience Replay โ€” Memory optimization (coming soon)
  • ๐Ÿ—๏ธ Dueling Network Architectures โ€” Advanced combat protocols (coming soon)

๐Ÿ”ง SYSTEM REQUIREMENTS | CYBERWARE SPECS

โ•”โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•—
โ•‘  MINIMUM REQUIREMENTS FOR NEURAL LINK            โ•‘
โ• โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•ฃ
โ•‘  โ–บ Python 3.9+ (Neural Interface)                โ•‘
โ•‘  โ–บ TensorFlow 2.16+ (Cortex Processor)           โ•‘
โ•‘  โ–บ Keras 3.x (Synaptic Framework)                โ•‘
โ•šโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•

๐Ÿ“Š RESULTS | EDDIES EXTRACTED

Target: GOOG corpo stock (2010-17 training data)
Mission Status: โœ… COMPLETE
Profit Extracted: $1,141.45 (2019 test) | $863.41 (2018 validation)

Night City Trading Session

"That's a lot of eddies, choom."

Check out the DataKrash Visualization Notebook for detailed analytics of your runs.


โš ๏ธ KNOWN LIMITATIONS | SYSTEM BUGS

Issue Description
๐ŸŽฏ Single-Stock Mode Agent trades one share at a time โ€” keeps the neural load manageable, choom
๐Ÿ“ˆ Normalized Vectors N-day window uses sigmoid normalization [0,1] โ€” standard Arasaka protocols
๐Ÿ–ฅ๏ธ CPU Training Sequential nature means CPU outperforms GPU โ€” no Kiroshi optics needed here

๐Ÿ’พ DATA SOURCES | CORPO INTEL

Download market data from Yahoo! Finance or use the included datasets in data/ directory โ€” pre-extracted from Arasaka servers.


๐Ÿš€ GETTING STARTED | INITIALIZATION SEQUENCE

STEP 1: Install Neural Drivers

# Initialize cyberware dependencies
pip3 install -r requirements.txt

STEP 2: Begin Training Protocol

# Jack into the training matrix
python3 train.py data/GOOG.csv data/GOOG_2018.csv --strategy t-dqn

STEP 3: Deploy Trading Daemon

# Unleash the trading ICE-breaker
python3 eval.py data/GOOG_2019.csv --model-name model_debug_10.keras --debug
โ•”โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•—
โ•‘  > SYSTEM INITIALIZED                                      โ•‘
โ•‘  > NEURAL LINK: ESTABLISHED                                โ•‘
โ•‘  > MARKET CONNECTION: ONLINE                               โ•‘
โ•‘  > STATUS: READY TO EXTRACT EDDIES                         โ•‘
โ•šโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•

๐Ÿ’ฟ MODEL FORMAT | DATA SHARD SPECS

Models are saved in Keras 3 .keras format โ€” the new corpo standard. Legacy TensorFlow 1.x shards are incompatible. If you've got old chrome, you'll need to retrain from scratch.


๐Ÿ™ CREDITS | FIXERS & CHOOMS

Props to these legendary NetRunners:


๐Ÿ“š REFERENCES | ARASAKA DATABASE

Required Reading for Aspiring NetRunners:


    โ•”โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•—
    โ•‘                                                           โ•‘
    โ•‘   "The street finds its own uses for things."             โ•‘
    โ•‘                        โ€” William Gibson                   โ•‘
    โ•‘                                                           โ•‘
    โ•‘   Wake up, Samurai. We have markets to burn. ๐Ÿ”ฅ           โ•‘
    โ•‘                                                           โ•‘
    โ•šโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•

Made with ๐Ÿ’œ in Night City | 2077

About

A trading agent AI is an artificial intelligence system that uses computational intelligence methods such as machine learning and deep reinforcement learning to automatically discover, implement, and fine-tune strategies for autonomous adaptive automated trading in financial markets

Resources

License

Security policy

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

Packages

 
 
 

Contributors 2

  •  
  •