Jumping into AI: Training My First Trading Agent (and Surviving the Swim)
How It All Started
The Idea
- I wanted to level up my backend skills, not just JS/TS frameworks.
- Plus, I always enjoyed building in Python when I worked in cybersecurity.
- I know I can make frontends with Next.js and deploy to Vercel. Easy.
- I’m comfortable enough in Python to handle the project.
- But let’s be honest: nobody knows everything on their first try! I remind myself—it’s fine not to know (yet). I’ll figure it out.
Connecting deployed services? Done that.
Biggest advantage: AI assistance is now at everyone’s fingertips—no more scratching through random forums for every bug.
My Build Process
Step 1: Backend (forex-backend)
- Repo: kedycatsudo/forex-backend
- Tech: GitHub, Python, FastAPI, SQLAlchemy, TradingView API, Docker
Step 2: AI Training (llama_lora)
- Tech Stack: Hugging Face, Google Colab, Python, Ollama, Unsloth, LoRA, Jupyter Notebook
My first tiny training dataset:
Json
Step 3: General Database
- Tech: PostgreSQL, SQLAlchemy or other Python ORMs, SQL queries.
Step 4: Frontend
- Tech: Next.js, React, TypeScript, Vercel
- Features: Conversational UI, market/news widgets, analytics display
Analogies: Coding & Cooking
- Frontend: The dining room, where users experience and interact.
- Backend: The kitchen, prepping and serving up data (the “food”).
- Servers: The “waitstaff”—they handle requests between frontend and backend.
- Storage: Local storage is like a minibar; big industrial freezers? That’s your database.
Results So Far
First data payload from TradingView API:
Json
- Get deeper into AI model training & deployment (with Unsloth + LoRA).
- Expand dataset and conversation quality.
- Wire everything together—end-to-end.
- Build a slick, user-friendly frontend, tightly integrated with the backend and the AI agent.
Learning & Reflections
Now I’ve built the backend, started meaningful AI training, and have a working pipeline from trading data to AI agent inference.
- Jupyter/Colab Notebooks: Essential for hands-on ML, stepwise coding, and iterative troubleshooting.
- Hugging Face: Like GitHub for AI; model hosting and dataset streaming made dead simple.
- Unsloth & LoRA: Make large-model training feasible—even without supercomputers.
Don’t be afraid to dive in—even when you feel like you’re in over your head. Debug, refactor, iterate, and ask for help (Copilot and AI assistants are friends, not cheats).
Final Thoughts
#python #ai #llm #tradingbot #huggingface #googlecolab #ollama #unsloth #machinelearning #finetuning #fastapi #postgresql #nextjs #backend #learningjourney #personalproject #coding #devblog #developer #fullstack #openai #jupyter #alpaca #lora #unstructuredlearning #projectlog