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 'Robotrade' 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 RoboTrade button fully automates the trading process.
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.
Bug Fix:
Add the following lines below lastPriceDownloadDate = "1/1/1" in Main:
lastTEUpDate = "1/1/1"
sumTE = 0