top of page

How to setup a VPS for Algorithmic Trading

  • Oct 10, 2025
  • 2 min read

In this tutorial we will setup a VPS for Algorithmic Trading. The VPS will host our Python trading bot that trades on the TWS platform. As for the trading bot, we will use our Statistical Arbitrage Bot template as an example. We will cover the following points:

  1. Order a VPS at ForexVPS

  2. Login to the VPS using Windows RDP

  3. Install TWS and setup API configurations

  4. Install Python and TWS API

  5. Run a Trading Bot



1 - Order a VPS at ForexVPS

A VPS stans for Virtual Private Server. It is a machine that is running in the cloud 24/7. It allows you to run your trading strategies non-stop without having to use your own PC. A big advantage of a VPS is the ability to host the machine in the same location as your broker server to reduce latency time.


ForexVPS is an efficient and affordable VPS provider. You can use our affiliate link to order your own here: https://www.forexvps.net/?aff=95338



2 - Login to the VPS using Windows RDP

RDP stands for Remote Desktop Protocol. It allows you to connect to your remote server from your personal windows machine. After you order your VPS from ForexVPS, you will receive the login credential for your VPS via email.


You can find your RDP App from your Windows Search Bar. Then you enter your login credentials and hopefully you have now access to your server.



3 - Install TWS and API configurations


Ideally, you want to use TWS Offline version to prevent unexpected updates which may make you trading bots incompatible.



4 - Download Python and TWS API

You can download Python here: https://www.python.org/downloads/.


In this tutorial, we are going to use Python 3.12 but feel free to use any Python version as long as it is compatible.


Python dependencies can be installed using PIP but TWS API has to be installed separately from IBKR Github Repo. Repo link: https://interactivebrokers.github.io/#


5 - Run the Trading Bot

In this tutorial, we are going to use our Statistical Arbitrage Template. ATJ Research Members can download the trading bot template by following this link:


For more information about Statistical Arbitrage Trading, you can check out this article: https://www.atjresearch.com/post/statistical-arbitrage-trading-gs-vs-ms-strategy-guide


For further assistance, members can contact us at research@atj-traders.com


If you are not yet subscribed and would like to download the file, please visit the following page: https://www.atjresearch.com/pricing-plans/list

 
 
 

Comments


bottom of page