Spartan Trader - part 11 (H24)
The Robotrader!
Goal
By completing this homework you will have completed the Spartan Trader series. You will have built a fully working Robotrader that implements a specific delta hedging strategy and executes it in real time on a simulated market.
Context

"And.... this.... is... the last.... End Sub... Done!" said you while typing the last keywords to complete the Spartan Trader
Program. It was late and you were tired, but also hugely satisfied with what you accomplished.
Ms. Tickertracker suddenly woke up. She dozed off in a chair in your office while waiting for you to finish.
"Will it work?"
"Only one way to know."
You pressed the 'Robotrader' button. The on-screen counter started counting down, waiting for the market data from the
exchange. After 27 seconds that felt like 27 minutes, the computer screen began flickering, in response of the inflow of
financial data from the markets. Both you and Ms. Tickertracker stood in silence, mesmerized by what you were witnessing,
watching dozen of trades being selected and executed in real-time. For once, the grandiloquent Ms. Tickertracker was utterly
speechless.
So it was you who broke the silence:
"The Spartan Trader is alive, Boss."
Requirements
The Spartan Trader is now a fully fledged robotrader. It can connect to our live online electronic market (Athens) and trade on
its own, implementing your financial strategies. Make sure that all previous parts work well before starting the new
homework. Remember that we cannot guarantee that the graded solutions are 100% correct. Quality control is your
responsibility.
In this last version
- The Sync button synchronizes the Spartan Trader to Athens, but does not execute trades. It lets you do so manually.
- The RoboTrader button fully automates the trading process
- The Spartan Trader visualizes its hedging performance
This last homework is not graded. It will be used in the Hedge Tournament. You do not need to submit it.
The vLab contains demo and instructions. This is some typed-up code. As before, feel free to change the look and feel of the app. In the video, a few characters of GetCAccount were cut. This is the whole code for the function.
Testing your Spartan Trader:
To test your work you need Athens (the exchange), to be running and serving prices every 60 seconds. A full run takes about 3 hours. For testing purposes, you do not need to be online with the exchange for the whole time, nor to be there since the beginning. You can jump in and out at will. However, the very beginning of the tournament is often a weak spot. Make sure that your Spartan Trader can start the Tournament without glitches.
To reserve a run, let me know via Teams. I will try to accommodate the requests of all 40 participating teams.
Bug Fix:
Add the following lines below lastPriceDownloadDate = "1/1/1" in Main:
lastTEUpDate = "1/1/1"
sumTE = 0