{"id":13599804,"url":"https://github.com/austin-starks/NextTrade","last_synced_at":"2025-04-10T17:32:32.206Z","repository":{"id":59652646,"uuid":"537869276","full_name":"austin-starks/NextTrade","owner":"austin-starks","description":"A system that performs algorithmic trading","archived":false,"fork":false,"pushed_at":"2024-08-15T16:41:43.000Z","size":53500,"stargazers_count":892,"open_issues_count":0,"forks_count":148,"subscribers_count":31,"default_branch":"master","last_synced_at":"2024-08-15T18:32:24.602Z","etag":null,"topics":["automated-trading","finance","frontend","investing","software","stock-market","trading","trading-algorithms","trading-strategies","tradingbot","ui"],"latest_commit_sha":null,"homepage":"https://nexustrade.io/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/austin-starks.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-09-17T16:40:02.000Z","updated_at":"2024-08-15T18:13:29.000Z","dependencies_parsed_at":"2024-08-15T18:29:54.199Z","dependency_job_id":null,"html_url":"https://github.com/austin-starks/NextTrade","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/austin-starks%2FNextTrade","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/austin-starks%2FNextTrade/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/austin-starks%2FNextTrade/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/austin-starks%2FNextTrade/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/austin-starks","download_url":"https://codeload.github.com/austin-starks/NextTrade/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223442661,"owners_count":17145815,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["automated-trading","finance","frontend","investing","software","stock-market","trading","trading-algorithms","trading-strategies","tradingbot","ui"],"created_at":"2024-08-01T17:01:12.005Z","updated_at":"2025-04-10T17:32:32.196Z","avatar_url":"https://github.com/austin-starks.png","language":"TypeScript","funding_links":[],"categories":["TypeScript"],"sub_categories":[],"readme":"# NextTrade - Plan your next trade\n\nA system to create, test, optimize, and deploy algorithmic trading strategies.\n\nFor a better, faster, cloud-based platform, [check out NexusTrade](https://nexustrade.io/). \n\nNexusTrade is a AI-Powered platform that streamlines the configuration of trading strategies. It's faster, more configurable, and more feature-rich than NextTrade. It features a powerful AI Chat Assistant tool as an entry point to many of its features.\n\nSome improvements include:\n - Enhanced configurability: Can essentially express any trading idea you can imagine\n - AI-Powered Research Tools: Perform in-depth company analysis and compare companies between each other\n - Powerful stock screener: Use natural language to find stocks in over 130 industries and 30+ indicators\n\n* [Read More about NextTrade](https://medium.com/@austin-starks/i-created-an-open-source-automated-trading-platform-f9d94575ceba)\n* [Comparing NextTrade to NexusTrade Part 1](https://medium.com/p/317b6e068254)\n* [Comparing NextTrade to NexusTrade Part 2](https://medium.com/p/cfa9bab0ee85)\n\n## NextTrade Features\n\n1. Combine conditions to form compound conditions. Combine compound conditions and create trading strategies.\n   - ![Compound Condition — returns true if all conditions are true](https://miro.medium.com/v2/resize:fit:1400/format:webp/1*sI_cc4c6bSYrXwPK5l81PA.jpeg)\n   - For example:\n     - Condition A: QQQ stock is 1 SD below its 5-day mean price\n     - Condition B: Buying power is above $8,000.\n     - Condition C: Condition A and condition B\n     - Strategy: If condition C, buy $3000 of SPY\n2. Create unlimited portfolios with different combinations of strategies\n   - ![Create unlimited portfolios](https://miro.medium.com/v2/resize:fit:1400/format:webp/1*6P6LA2dWeNEt-arU_y0E6A.png)\n4. Backtest those strategies using historical data.\n   - ![Backtest your portfolio](https://miro.medium.com/v2/resize:fit:1400/format:webp/1*1tO6BOwr2dKiKdMdvDnM2g.jpeg)\n   - Only stocks are currently supported, but cryptocurrency and options support is baked into the architecture\n6. Optimize the strategy's parameters using a genetic algorithm\n   - ![Optimize your strategy with Genetic Algorithms](https://miro.medium.com/v2/resize:fit:1400/format:webp/1*GOnxADcrSF_VIJylmemnaA.png)\n   - Choose hyperparameters like mutation rate, training period, validation period, and population size\n   - Choose to optimize percent gain, sortino ratio, sharpe ratio, or max drawdown\n8. Deploy the strategies live and see how it performs in real-time\n   - ![Deploy your strategies live with the click of a button](https://miro.medium.com/v2/resize:fit:1400/format:webp/1*-MmD0EBTkAsYiED9hwDprA.png)\n\n## System Architecture and Design\n\nSome architectural artifacts can be found at this link:\nhttps://drive.google.com/drive/folders/1TgZNGPd7TBWi47dWh0TI2nZ_9WUhv_P_?usp=sharing\n\n## Local Installation\n\n### Prerequisites\n\n1. Mac, Linux or WSL2 preferred\n   - [How to set up Linux on Windows with WSL 2](https://s1gr1d.medium.com/how-to-set-up-linux-on-windows-with-wsl-2-debe2a64d20d)\n2. Tradier Account (with at least a free sandbox token; additional brokers TBD)\n   - [Production vs Sandbox data details](https://documentation.tradier.com/brokerage-api/overview/market-data)\n   - [Sandbox Account and Signup info](https://documentation.tradier.com/brokerage-api/overview/endpoints)\n\n### Mac Setup\n\n1. Clone the repository.\n2. Install [MongoDB community edition](https://docs.mongodb.com/manual/administration/install-community/) and enable it.\n3. Install the dependencies: `npm run install-all`\n4. Make sure all tests pass: `cd app \u0026\u0026 npm t \u0026\u0026 cd ..`\n5. Add your Tradier token to the `./app/env` file and rename the file to .env\n\n### Linux/WSL2 setup (tested on Ubuntu 20.04)\n\n1. If needed, install Node.js. NVM Option:\n   1. `curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/master/install.sh | bash`\n   2. Exit and restart the terminal session.\n   3. `nvm install --lts`\n2. Install [MongoDB community edition](https://docs.mongodb.com/manual/administration/install-community/) and enable. For Ubuntu 20.04:\n   1. `curl -fsSL https://www.mongodb.org/static/pgp/server-4.4.asc | sudo apt-key add -`\n   2. `echo \"deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/4.4 multiverse\" | sudo tee /etc/apt/sources.list.d/mongodb-org-4.4.list`\n   3. `sudo apt update`\n   4. `sudo apt install mongodb-org`\n   5. Linux/Ubuntu specific:\n      1. `sudo systemctl status mongod` (verify it's running)\n      2. `sudo systemctl enable mongod` (to auto-start at boot)\n   6. WSL2 specific:\n      1. `sudo mkdir -p /data/db`\n      2. `` sudo chown -R `id -un` /data/db ``\n      3. `wget -O mongod.sh https://raw.githubusercontent.com/mongodb/mongo/master/debian/init.d`\n      4. `sudo mv ./mongod.sh /etc/init.d/mongod`\n      5. `sudo chmod +x /etc/init.d/mongod`\n      6. `sudo service mongod start`\n         - [Auto-start options for WSL2 on Win11](https://learn.microsoft.com/en-us/windows/wsl/wsl-config#boot-settings)\n      7. `sudo service mongod status` (verify it's running)\n   7. `mongo --eval 'db.runCommand({ connectionStatus: 1 })'` (verify it's working)\n3. Clone the NextTrade repository: `cd ~ \u0026\u0026 git clone https://github.com/austin-starks/NextTrade \u0026\u0026 cd NextTrade`\n4. Install the dependencies: `npm run install-all`\n5. Copy the sample config file to .env `cp ./app/env ./app/.env`\n6. Add your Tradier token to the `./app/.env` file\n7. Make sure all tests pass: `cd app \u0026\u0026 npm t; cd ..`\n\n## Turning on the system\n\n### Manually managed\n\n#### Development environment\n\n1. Open two terminal windows.\n2. In a terminal instance, turn on the client: `cd client; npm start`\n3. In another terminal instance, turn on the server: `cd app; npm start`\n4. Once started, load the app: [http://localhost:3000](http://localhost:3000)\n\n### PM2 Managed\n\n#### Setup\n\n1. `npm install pm2@latest -g`\n2. `cd ~/NextTrade/client \u0026\u0026 pm2 start npm --name \"NextTrade-Client\" -- start`\n3. `cd ~/NextTrade/app \u0026\u0026 pm2 start npm --name \"NextTrade-App\" -- start`\n4. `pm2 save`\n\n#### Running (assuming no other PM2 apps)\n\n1. To start the client+app: `pm2 start all`\n2. To stop the client+app: `pm2 stop all`\n3. Other Useful commands: `pm2 status`, `pm2 logs`, `pm2 monit` See [PM2 Quickstart](https://pm2.keymetrics.io/docs/usage/quick-start/) for more.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faustin-starks%2FNextTrade","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faustin-starks%2FNextTrade","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faustin-starks%2FNextTrade/lists"}