Are you anything like me? When I
first learned how Machine Learning
and Artificial Intelligence helps
people find hidden patterns
within…
Are you anything like me?
When I first learned how
Machine Learning and
Artificial Intelligence helps
people find hidden patterns
within data, my first thought
is “I’m going to use this to
trade stocks!” From reading
forums on websites like Reddit
and Medium, it seems like this
is a very common idea.
But as common as the idea is,
it seems like not many people
actually did it. Sure, there
are cookie-cutter guides on
Medium that claim to predict
stock prices with LSTMs and
Reinforcement Learning, but
when you actually try them for
yourself, you will fail.
I decided to build a
genuinely useful platform to
help with algorithmic trading
and financial research. The
first iteration of the
platform was called
NextTrade.
And it sucked!
So much, that I open-sourced
it and entirely gave up on
it!
However, by writing about my
NextTrade, I was re-inspired
by my original vision. I
decided to take the lessons
that I’ve learned and build an
entirely new algorithmic
trading platform.
The end result is a faster,
more versatile tool that over
4,000 people have used. It’s
called
NexusTrade.io.
Here’s what sucked about the
original
NextTrade
platform and what I had to
fix.
1) Way too HARD to create a
trading strategy
The original
NextTrade
platform allowed users to
create trading strategies
within a no-code UI. For
example, here’s me configuring
the idea “30 days have passed
since the last buy and SPY is
1 standard deviation below its
30 day average price”.
Configuring a strategy within
NextTrade
As you can imagine, utilizing
a form like this requires a
steep
learning curve, particularly
for newer users who are
curious about the platform and
not fully convinced on the
value it brings.
Within
NexusTrade, I fixed this in two
ways.
Firstly, I created an AI
Chat, that can translate
your ideas from plain
English into a configuration
the app can understand.
The AI Chat will give
suggestions for the types of
strategies you can create within
the platform
By speaking with Aurora, the
AI Copilot, she will generate
a portfolio which you can save
to your profile, backtest, and
deploy to the market.
Creating a “Buy and Hold Apple”
Portfolio with Aurora
In addition to creating
algorithmic trading
strategies, Aurora can perform
in-depth financial
analysis
and
screen for stocks using
natural languages. These tools make her
versatile for more than just
algoirthmic trading.
Secondly, I released an
Algorithmic Trading
Strategy Library.
Algorithmic Trading Strategy
Library
The library allows you to
take pre-existing strategy
templates and evaluate how
those strategies performed in
the past.
The Algorithmic Trading
Strategy Library
This gives you a starting
point for creating strategies.
You can see the percent change
of the strategy, the sharpe
ratio, the drawdown, and more.
After finding a strategy that
you’re interested in, you can
then save it to your profile
and deploy it live for
real-time paper-trading.
2) Way too SLOW for an
algorithmic trading
platform
I created the NextTrade
platform when I
barely knew how to code. As a
result, I made several
critical design decisions that
made it impossible to iterate
on, and forced me to give it
up. One of these decisions
involved utilizing TypeScript
for the core trading logic and
not thinking about clever
strategies to reduce the
computation of
backtests.
To be clear, this wasn’t a
problem for live-trading. I
also could’ve made it work for
backtesting, even though it
took several seconds for a
backtest to run over a
relatively short time
period.
A backtest within the old
NextTrade platform
However, this was
absolutely
unacceptable
during genetic
optimizations.
Genetic Optimizations in the
old NextTrade platform
Genetic optimization is an AI
algorithm that finds the best
parameters for the inputs by
running simulations that mimic
natural selection. In trading,
it can be used to find the
best possible trading strategy
over a given time
period.
Because the backtests were so
slow, it took
days
to run large-scale
optimizations. This was
entirely impractical,
especially if I were to ever
scale to more than one user.
It
NEEDED to be faster. A lot faster.
And here’s how I fixed
this.
I rebuilt the core trading
logic from scratch.
Instead of TypeScript, I
built everything using Rust,
one of the safest and fastest
programming languages. I also
made clever use of rolling
windows and caching to vastly
expedite backtest
performance.
The end result was a platform
that could run large-scale
genetic optimizations in
minutes. Not days.
3) Way too NICHE for a SaaS
platform
If I was to eventually build
a SaaS platform that would be
worth over a million dollars,
I had to make it more
accessible to a wider
audience.
Don’t get me wrong.
Algorithmic trading is very
cool. The ability to create,
test, optimize, and deploy
strategies to the cloud is the
next step when it comes to
advancing retail
trading.
But right now, its incredibly
niche. Most people won’t
understand why receiving
relevant data and executing
clever algorithms can help
them with their trading.
Thus, I needed to improve the
appeal of NexusTrade, and
implement new features so that
its accessible to traders and
investors who have not yet
delved into the realm of
algorithmic trading.
I did this in two ways. For
one, I created a highly
detailed stock information
page for all US stocks.
NVIDIA stock information
page
Users can find more
information about their
favorite stocks without having
to create an account. Users
can learn what the stock
actually does, what industries
they are in, and get access to
useful fundamental metrics
about the stock.
Fundamental Metrics about
NVIDIA
Premium users can actually
see the change in a metric
over time and learn more about
what that metric means. For
example, by toggling free cash
flow, you can see NVIDIA’s
change in free cash flow, and
what that means for the
company.
Free Cash Flow for NVIDIA
In addition to viewing a
detailed stock information
page, users can navigate to a
fully-featured stock
screener.
The Simple Stock Screener
makes it easy for users to
find novel investing
opportunities in whatever
industries they want,
including
3D printing,
biotechnology, and
artificial intelligence.
These tools transform
NexusTrade from a super-niche
algorithmic trading platform
to an extremely versatile
investing and research
platform that empowers
everyday investors.
Conclusion
This article shows how my
algorithmic trading platform
has improved significantly
over the past few years. I
transformed it from a slow,
borderline useless toy project
to a powerful, fully-featured
AI-Powered trading
platform.
All entreprenuers think
they’re businesses should be a
multimillion to multibillion
dollar project. But many SaaS
projects don’t solve real user
problems and like to ride on
the hypetrain to skyrocket
their business into
popularity.
NexusTrade.io
takes a different approach. I
built all of the features
knowing they would bring value
to everyday retail
investors.
And I know that if I keep
executing, I will develop the
best trading platform that the
world has ever seen.