Automated Trading System - Technical Case Study
Portfolio control, custom trading systems, proprietary indicators and automatic order management. Real-time notifications for every executed operation. System developed and operational for 12+ years.
MAOTrade was born from the need to implement real trading strategies in code. A system developed by a developer with direct experience in the trading world, where each account operates completely independently.
An automated trading system must guarantee total control. That's why MAOTrade uses complete isolation between accounts and operational flexibility without compromises.
Each account operates completely independently. If one account has problems, the others continue to function normally. You can stop, restart or reconfigure an account without touching the others.
Main dashboard to monitor portfolio, insert signals and intervene manually when necessary
Control center to configure brokers, trading strategies and monitor performance
Automatic order management with direct broker connections for speed and efficiency
Custom studies and proprietary indicators for chart analysis and optimized trading decisions
Each broker account operates completely independently, eliminating interference risks
Continuous operation surveillance with automatic backups and immediate notifications
"An automated trading system should be a tool in the trader's hands, not a replacement. Maximum automation when everything goes well, immediate control when intervention is needed."
Insert the trading signal
Strategy processes the data
Order sent to broker
Real-time monitoring
Results and notifications
Total control: you can intervene manually at any point in the process
MAOTrade was born from direct market experience. Every feature reflects the real challenges of trading: from operational risk management to order execution, from position control to performance monitoring.
Each trading system implements its own pre-trade controls according to the strategy's specific logic. Automatic position management and exits are completely programmable.
Currently integrated with IG Trading, with extensible architecture for other brokers through custom API connectors. No intermediaries, direct connection for maximum execution speed.
Develop your strategies without limitations for intra-day and multi-day trading. Timeframes from 1 minute up, proprietary indicators and completely custom trading logic.
Each broker account operates in complete isolation. A technical problem on one account does not compromise the others. Architecture that guarantees total separation between different accounts.
MAOData generates custom studies and advanced charts. Strategy testing on historical data through MAOTrace to simulate trading system behavior.
Trading system execution monitoring through MAOTrace. Immediate push notifications for orders and errors. Visualization of market situations that generated each order.
Immediate control over every position. Ability to block strategies, modify orders or close positions with one click. Instant override when necessary.
Android application (web version also available) that puts you in complete control of your operations.
Technical configuration is handled once: broker connection, strategy setup, operating hours.
Everything you need to operate is done from your smartphone or computer.
Ideal for operators managing different strategies simultaneously on separate accounts. Isolation guarantees that a problem on one strategy doesn't compromise the others, while manual control allows overrides when necessary.
Designed for those requiring rigorous separation and detailed reporting. Each environment can have its own dedicated setup with complete traceability and continuous monitoring for extended operations.
Distributed system for automated trading with focus on reliability, error isolation and robust broker API management. Microservices architecture designed for intra-day and multi-day strategies.
One broker account per Docker container. This choice guarantees total isolation between accounts, preventing API problems from one broker from impacting other operational accounts. MAOPods automatically orchestrates the containers.
Centralized for system configurations, account registry, strategy settings and data shared among all components.
For exclusive use by MAOTrade for orders and signals. Limited access through internal APIs to guarantee data integrity.
Main engine in Python 3 for strategy execution and order management. Direct interfacing with broker APIs, signal processing and financial data flow control.
Data source: Time frames ≥1 minute for intra-day and multi-day strategies. Exclusive access to trading database through internal APIs.
FastAPI service layer for data exposure through REST APIs. Single gateway for database access and inter-service communication.
Async/await: Asynchronous management for optimal performance with simultaneous MySQL and MongoDB connections.
MAOTrace: Evolution from Java Android to Vue 3 PWA for real-time monitoring. MAOAdmin: Complete interface for configurations and system management.
Progressive Web App: Service worker with Workbox for offline functionality and native-like performance.
Scheduling system for data acquisition and custom indicator generation. Batch processing for technical analysis and data enrichment.
Data acquisition: Web scraping with Selenium for external sources, quantitative processing with numpy/pandas.
Custom orchestrator for automatic Docker container management. Monitors configurations and manages container lifecycle for each account.
Auto-management: Automatic creation, restart and termination of containers based on account configuration.
Centralized logging: Fluentd collects logs from all components to MongoDB. Monitoring: Nagios for health checks and alerting.
Proactive monitoring: Automatic email alerts for anomalies on servers or architecture components.
Each architectural choice solves specific automated trading problems:
Problem: Unstable broker APIs: disconnections, timeouts, malformed responses
Solution: Containerization for error isolation, automatic restarts, robust retry logic and detailed logging for troubleshooting
Problem: Preventing problems on one account from impacting other operational accounts
Solution: One Docker container per account, dedicated databases for trading, stateless communication via REST APIs
Problem: Processing time series from 1 minute for intra-day and multi-day strategies
Solution: Intelligent buffers, data aggregation with pandas, optimized MySQL storage for fast analytical queries
Problem: Supporting multiple strategies and accounts without operational complexity
Solution: Microservices with defined responsibilities, automatic orchestration, centralized monitoring and simplified deployment
Pragmatic system design with focus on robustness and maintainability. Direct experience in the financial domain for accurate functional requirements and architectures suited to real automated trading needs.
I am Alessandro Osti, a developer and trader with over 12 years of experience in designing automated trading systems.
MAOTrade was born in 2012 as an idea of my father Maurizio Osti, retired former director of the Bologna branch of Banca Monte dei Paschi and previously portfolio manager for major clients. He involved me for two reasons: my technical expertise and his desire to introduce me to the world of finance to create a profitable skill for me.
The original idea was to develop a trading platform to offer as a service to some private investors that my father knew. My role was to translate his vision into code, following his advice on risk management logic and system architecture.
My father introduced me to professional trading by presenting me to Giuseppe Migliorino, considered the father of Italian cyclical analysis. My training with Migliorino was thorough: we participated in all his courses, Think Tanks and research activities that he proposed. Meanwhile I also met Eugenio Sartorelli, expert in cyclical and intermarket analysis. My training also continued by attending industry conferences with Maurizio Mazziero, Roberto Malnati, Davide Biocchi and Francesco Caruso.
In 2016 my father died before completing the project, and the three pilot clients decided to abandon it. From that moment MAOTrade became my personal research laboratory: a framework where I could test and put into practice the strategies I had started to learn.
Over the years it has evolved while always respecting the assumptions from which it was born: every component solves real problems that I encountered while trading with real money.
I believe in the importance of balancing automation and human control. MAOTrade automates strategy execution and records in its logs all the information necessary to monitor operations, any infrastructure errors, data and executed orders. In this way it combines the convenience of an automated system with the security derived from its transparency.
These conditions allow me to confidently entrust the management of my capital to the machine. At the same time, I always maintain the possibility of intervening manually, closing positions at any time, totally or partially.
Both the markets and the IT infrastructures we use are complex systems where the unexpected is the norm, not the exception.
MBA in Finance with specialization in business management and corporate finance
Technical and cyclical analysis of markets
Python 3, Docker, MySQL, MongoDB, Vue 3 PWA, Android, Selenium, NumPy, Pandas
Easy Language, distributed architectures, database management
TradeStation, MultiCharts for technical analysis, backtesting, research and strategy testing
12+ years developing trading systems, IT consultant, quantitative research
Behavioral Finance and Decision Making Process
An exploration of the key concepts of Daniel Kahneman's "Thinking, Fast and Slow" and Taleb's critical approach to behavioral finance, with implications for trading system design.
I've built MAOTrade over the past years to fully automate my trading. It works, it's in production, and I'm always curious to discuss with those working on similar problems or wanting to understand how I solved it.
Maybe you have your strategies but still execute them manually, or want to fully automate the workflow, or you're interested in how I manage multiple strategies simultaneously on separate accounts.
This project shows how I work: Python, Docker, databases, web interfaces. It's all written by me, has been in production for years, and handles real operations.
You like seeing how others solve complex problems. Managing real-time data, isolated containers for each account, robust interfaces - all interesting challenges.
You work for a broker, bank, or develop software for traders. Maybe we can exchange ideas about APIs, protocols, or simply compare different approaches.
I reply promptly: I don't like keeping emails pending
I go into details: If the conversation is interesting and mutually useful
Zero bullshit: Tell me what interests you, let's get straight to the point
I'm not selling anything: It's a personal project I share for experience
If you have specific questions or want to discuss something, feel free to write.