/MyQuantsFinance

My Algorithmic trading bots and strategies for Quantitative and High-Frequency trading in FinTech

Primary LanguageJupyter Notebook

Quants 🤖

"A Quant, or Quantitative Analyst, embodies the fusion of finance and technology, leveraging mathematical, statistical, and computational techniques to decode the complexities of financial markets."

Becoming a Quant ⚖️

I'll begin by coding the Basic Indicators listed below. These indicators have been used for decades but mastering these allows you to identify Market Trend (downtrend or uptrend), Supply and Demand zones (areas where most people bought or sold), Volume, and Volatility. From there I'll focus on creating Trading Strategies that leverage these insights to automize spotting entry/exit points, risk/returns, breakouts, reversals, and profits. Before executing any trade live, a backtest is needed to ensure a Profitable Strategy

Demistifying the Financial Market (FinTech) 🔮

Key Terms:

  • Assets - Equities (Fancy name for Stocks), Commodities, Cryptocurrencies 📉📈
  • Liquidity (Fancy way of saying Funds) 💧
  • Derivatives - AKA Options | Futures | Perpetuals 📈 - used to trade with margin.
  • Margin/Leverage - Many exchanges allow you to borrow funds to execute trades, with the risk of being liquidated, this occurs once your available liquidity runs out 💰.
    $1,000 with 10x margin = $10,000 (CAUTION ⚠️ this also means you risk losing money 10x faster)

Quant Trading 🧠💼

Basic Indicators:

  1. EMA (Exponential Moving Average) - Weighted moving average used for trend identification 📉.
  2. RSI (Relative Strength Index) - Momentum oscillator identifying overbought or oversold conditions 🔴🟢.
  3. VWAP (Volume Weighted Average Price) - Average price based on volume and price 🔍.
  4. MACD (Moving Avg Convergence Divergence) - Uses two moving avgs to identfy momentum and revrsal points.
  5. Bollinger Bands - Used to spot reversals, corrections, and entry/exit points based on Standard deviation of EMAs.
  6. Fibonacci Retracement - Uses Fibonacci ratios to indicate potential support or resistance levels 🔢.

Trading Strategies:

  1. Mean Reversion - Assumes prices revert back to the mean and trades against trends 🔁.
  2. GARCH - Good at forecasting future volatility, derivative pricing, risk management and portfolio optimization 🗞️
  3. Pair Trading - Bets on the convergence/divergence of two similar companies' stock prices 📊.
  4. Breakout Trading - Looks for levels or areas that a stock has been unable to move beyond, and waits for it to move beyond those levels 🚪🔓.
  5. Lorentzian Classifier - Uses Lorentzian distance metric and KNN algo for price forecasting 🏃‍♂️💨.

Advanced Trading Strategies:

  1. MLSentiment Strat - Analyzes market mood through news and social media using FinBert for trading signals 💬
  2. Machine Learning Models - Predicts market movements using historical data and algorithms; LSTM, K-Means Clustering 🤖📈.
  3. Option Strategies - Employs methods like delta-neutral trading to hedge market movements 🛡️.
  4. High-Frequency Trading (HFT) - Executes numerous trades daily to capture small price movements ⚡.
  5. Market Making - Provides market liquidity, profiting by looking at the Order book and seeing bid-ask spread to see where price is likely to gravitate to ↔️.

Comparing My Strategy vs Simply holding S&P500

Building LLM locally to specialize in FinTech, automize analyzing research articles, data, and backtest strategies.

Autogen - Create personalized agents that specialize in specific task i.e., AI Quant Research assistant

pip install autogenstudio
autogenstudio ui --port 8081 # Access AutoGenStudio in your localhost

Ollama - Allows you to download and run LLMs locally.

pip install ollama
ollama serve # Should run on Localhost:11434
ollama run mistral # Download & installs Mistral LLM locally ~4gb size file

LiteLLM - Provides embeddings, error handling, chat completion, function calling

pip install litellm
litellm --model ollama/mistral # Launches Mistral LLM locally