Thu Sep 10, 2026
You have two fitted models sitting in a file. Today you wrap them in something a person who has never opened Python can use.
Frontend
The browser. HTML, CSS, and JavaScript — it draws the page and collects the clicks.
Backend
A program on a server that listens continuously for requests. Yours will be Python.
You open a URL. The browser sends a GET request. The server sends back the HTML, CSS, and JavaScript it was written to send. The browser interprets that and shows you a page.
Right-click any web page and choose View Page Source. That is the frontend code, exactly as the backend handed it over.
A POST request carries data the other way — a form, a ticker you typed. The server does what it was written to do and replies.
The backend and the frontend can be the same computer — lab638, or your own laptop if you have Python installed on it.
localhost
127.0.0.1 is the loopback address. The browser asks the machine it is already running on, and the request never reaches a network.
Ports
One machine can run many programs listening at once. The port number tells the operating system which of them gets the request.
You write the app as a .py file. FastAPI is the dominant Python library for writing one; uvicorn runs it and starts it listening on a port: python3 -m uvicorn app:app --reload.
ps to the warranted ps the models predict.The demo
The models and session4.parquet ship inside the app. It is a snapshot — the same rows every time anyone opens it.
Production
The session 4 data would be updated daily, and the models refit periodically as new data accumulates.
The verdict
The comparison
Argue these out with AI before you write code.
You hand a host your repository. It builds the app, runs it, and puts it behind a public URL — there is no server for you to administer. Railway, Render, Koyeb, and Heroku all do this. We will use Koyeb, which has a free tier.
koyeb.com..env file:>> appends, and creates the file if you do not have one. Koyeb’s web UI will link a GitHub repo with no token at all — the token is what lets AI do the deploying for you, which is the path we are taking.
Prompt
My goal is to push this app to GitHub as a new public repo and then create a Koyeb service connected to that repo. Walk me through it one step at a time.
On day one you told git to ignore parquet files. The host builds only what is in the repo, so the model file and the data the app reads have to get there. And nothing from .env belongs in a public repo — secrets go in Koyeb’s environment settings.
Optional. The Koyeb URL works fine on its own.
dnsimple.com and buy a domain name..env:Prompt
I bought mydomain.com at DNSimple and my app is running on Koyeb. Use the DNSimple API v2 with DNSIMPLE_ACCESS_TOKEN to create the record Koyeb needs, and tell me what to configure on the Koyeb side.
MGMT 638 · Gen AI and Quantitative Investments