algoTrade with raspberryPi

algoTrade

tradeRunner is trading platform I have been developing since the beginning of 2018. At the beginning the idea was preparing order-automation tool for a friend, then introduced one algorithm for finding repeated trade patterns. For testing and improving algorithm performance started to develop extra modules, which at the end turn to be full functional trading platform.

Except “numPy” and “pandas” all libraries are created from scratch for the platform . It was not very efficient way as there are already solid platforms. Still I decided to go more experimental and fun way. Above, is the simplified pipeline of the model.

main modules>

  • tradeNet comunication module with markets & archives historical data in regular intervals.
  • tradeCore take market data(live or backtest), predict pattern
  • tradeRunner excecutes tradeCore in realtime market
  • tradeBackTester  runs tradeCore with historical data, and measures the performance of algoritm
  • tradeEvo tries to improves algorithms performance by altering it’s config parameters

dataFlow> communication between modules are achieved with fallowing data blocks and files

  • liveMarketData
  • BackTestArch
  • periodicCheck
  • lliveLedger
  • algoConfig

performance output>

  • performanceReport back test reporting
  • evolutionChart evolution algoritm with different input-output comparison
  • performanceChart run algoritm on selected timeline

evolutionAlgorithm>

platform is using evolution algoritm(EA) to maximise it’s performance. Current one is 2dimensional-EA (altering one input, checking performance change, finding highest performing parameters).  However as core algorithms using multi dimensional input, it is not very optimised. Currently I am trying to to develop new model on, which will be handles on next post

hardware>

piStack.jpg
pi stack
  • practice-live system is runing under raspbery pi 3b, with 1GB ram and 1.2GHz 4 core cpu.
  • real-live system is runing under raspbery pi 3b+, with 1GB ram and 1.4GHz 4 core cpu.
  • backTester and evolution algoritms are running with PC, i7-4790k CPU, 32 gbRam

On PC there is no limitation of simultaneous running algorithms, however raspberry-pi has limited CPU & memory capasity. Code optimization and having additional fans, improved the setup. However memory is still issue. will run second optimization for decreasing memory purposes.

pis.JPG
practice and live TR in  raspberyPi 3b &3b+

FutureImprovements>

  • additional pairs will be analysed with BT module
  • multi dimensional EA will be introduced
  • patern recognition and changing algoPaterns will be automated, instead of running EA modules and analyzing data manually
  • UI will be improved.
  • risk management will be improved,
  • error correction protocols will be improved,

 

 

 

 

 

 

 

 

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s