Building with ChatGPT: how we launched Autonomous Investment Fund for Options Trading.
What does it take to launch a product with ChatGPT? As a seasoned consultant, I've spent countless hours aiding companies in constructing their cloud-based futures. But a few months back, an intriguing opportunity presented itself, irrevocably altering my professional landscape. ChatGPT entered the scene, swiftly carving out a path for us towards product development. Before we knew it, we found ourselves at the helm of an active portfolio management, wholly operated by ChatGPT.
The new approach to investing that ChatGPT allows is pretty amazing. It makes decisions, executing trades, manages positions, and delivering reports - way outperforming anything available to investors from legacy firms. The mechanism is compelling, bordering on the surreal. ChatGPT identifies an option contract to collect premiums, notifies the user for confirmation, and patiently awaits approval or disapproval.
The reasoning ChatGPT provides is probably in 98% quality percentile of all the professional investment advices industry. It is precise, quantitative, engaging, easy to understand and to commit. Usual disclaimer: this is, of course, not an investment advice. This is pure fun with LLM model.
The confirmation is a precautionary step for the initial development stages, it acts as a safety net while we're navigating the unchartered territory of live testing.
With the approval, the process advances. The order is placed with the broker and still they're waiting to fill. Let's consider the order is fulfilled. Next day, ChatGPT may do few more trades. After a while, there is an active investment portfolio formed.
Consider this live portfolio, humbly funded with $7000 initial capital.
As shown, ChatGPT employed 38% of available capital for position margin requirements, securing $320 in premiums. It is now manages positions, prepared to act when they reach 50% of maximum profit within the next 5-10 days, or "roll" them to next expiration cycle as needed.
What sets this portfolio apart is a low correlation with the broad market (0.3 correlation with SPY). It also boasts 97% probability of profit. How is this possible? The events against which ChatGPT sold "insurance" are unlikely to materialize, thanks to accelerated options decay. Makes has to drop 2 standard deviations (2 sigma), a rare but plausible event. If that happens and PUT options get assigned - ChatGPT wouldn't mind. These stocks generate impressive dividends. And ChatGPT switches to selling calls against them to collect additional premiums.
Today, ChatGPT has sold options to collect $65 in premium credits, opening small positions in T and WBA. One captivating facet of this journey is simulating the probability of profit. The Tastytrade broker performs a Monte-Carlo simulation, considering the current prices, implied volatility, and presents a forecast for achieving 50% profit of the collected premiums in a cumulative histogram.
Here is one for WBA: it shows about 7 days and 6 days for T option to achieve 50% POP. We'll leave it to the readers to calculate return on capital.
ChatGPT has effectively simplified a complex process. However, the simplicity of the process does not diminish its value. Anybody can do it, actually:
领英推荐
Despite this apparent simplicity, the human element will introduce inconsistency. Investors attention attacked by media with presidential cycles, inflation trends, geopolitical crises, fluctuating Federal rates and all the other noise. It will cloud judgment and disrupt discipline.
"But just do passive investment instead" advocating mutual funds managers with 0.9% expense ratios and consistently underperforming the broad market obscure "product".
"But just do cheap index funds", advocating coach potato investors. Yes, thanks buddy. I'll travel 25 years back and start diligently investing portion of income.
This is where the brilliance of ChatGPT shines. It allows to contextualize volatility environment, it disregards all noise and financial "wisdom" and it focuses on actual opportunities. That starts to remind... prompt engineering! The investment strategy is morphing into a refined prompt engineering development.
But the saga doesn't end there. No matter how sophisticated the prompt and how many billions of parameters the model has, the data, our faithful guide, leads the way. We're not leveraging any proprietary data - merely the standard market quotes stream. But gathering it, massaging, assembling, filtering - these tasks form a significant portion of the development and ChatGPT was super helpful with the development.
Reliable and usable APIs are critical in this journey. With only a handful of brokers possessing a passable API, and even fewer meeting basic standards, navigating the tech underbelly of the finance industry can be daunting.
Overall, ChatGPT has significantly accelerated the development process for workflow engine and web-client. Without it, we would've been hesitant to undertake a project of this magnitude. It still calls for judicious decisions on constructing everything on a level slightly below the product strategy.
From a technical standpoint, our stack is Typescript, a few API clients (OpenAI for ChatGPT, broker's API), Projen to bootstrap and manage the Typescript application, and AWS CDK for AWS infra. And for those asking where's the cool AI "frameworks"? - it's absent by design. Basic abstractions in general purpose programming language win hands down over "ai frameworks". Also, remember that ChatGPT in its core is a text inference endpoint - text in and text out. It has remarkably simple and usable API.
The architecture of the product is outlined on a Wardley Map below. Currently, it is remarkably simple, with a minimal amount of internal workflows and limited user interfaces.
At its core, this product leverages ChatGPT to efficiently allocate capital in the very liquid markets. Its additional features are for enjoyment, the process of making money is pretty boring. The graphs, statistics, metrics, judgment calls ChatGPT writes - they are nice bells and whistles to the core.
Moving forward, we plan to introduce more workflows, including trading highly efficient options on futures, an interactive web UI with fully open, live portfolio stats, add more capital and scale up trading.
Wish me at least 68% of luck with this!
??
Capital Markets and Software
1 年It's been one month the ChatGPT is managing the fund. It made 50 trades. After one month we increased capital to 25k USD. The time-weighted return for the given periods is approximately -12.41%. Overall the fund is down $771 We're developing web-UI and expanding workflows ChatGPT can handle: managing positions, covered calls, and risk management.
Co-Founder at NeonPanel Inc
1 年I wish you 72% of luck ) It's an interesting project
Capital Markets and Software
1 年Forgot to mention: the time frame was less than a month from idea to implementation. The acceleration of development with ChatGPT is ridiculous!