Spartan Trader 2

Accessing financial information from a remote database using SQL


Goal

By completing this homework you will learn how to retrieve financial information from different remote databases and visualize it in Excel


Context

source:memegenerator.net

“How is it going?”
“Very well Ms. Tickertracker… I am done with the market data downloads from the three DBs.”
“Faaaaaantastic! I knew you could do it.  In fact, I was so sure of it that I brought you the next installment of the project.   It will be a piece of cake for you. It is more of the same, really.  I want to be able to download data about our trades, our positions, the parameters…  everything we have in the DBs.  Can I come back in a couple of days to test it?”
“Of course.  It will be ready, Boss!”


Requirements

 All three databases have the same structure, but might contain different data. Some tables might be empty. That is OK, too.

  • Everything from all previous homework must be implemented correctly
  • Assume that for the time being you are team 30, even if you already have a teamID assigned.
  • Implement regular buttons to download to Excel the data in ALL the remaining tables. This data model shows the structure of the databases.
  • Retrieve and visualize the current system date. This is the HT date, not the real time date.

The vLab contains a demo and shows examples, but not the whole homework.  Feel free to change labels, colors, fonts, positioning of the controls, variable names, control names, procedure names.... anything.  Provided that your Spartan Trader interface is reasonably polished, easily understandable by the grader and retrieves all the needed financial information, the specifics are up to you.  The Spartan Trader is your app. You are the developer and the user. You build it the way you like it. You will use it in the Hedge Tournament.


Bug fixes

Sometimes the LOs in the dashboard do not fully recolor, for example when you change DB and in other conditions.
Easy fix: just insert at the end of ClearAllLO() these two lines
Globals.Dashboard.InitialPositionsLO.ListRows(1).Range.Interior.Color = System.Drawing.Color.Black
Globals.Dashboard.AcquiredPositionsLO.ListRows(1).Range.Interior.Color = System.Drawing.Color.Black
If your dashboard background is not 'black', substitute with the right color.


Sometimes the LO does not format the dates in the first row correctly.  Just force the cell that misbehaves to assume the right format by adding at the end of the button code the following:
Globals.Markets.Range("B3").NumberFormat = "m/d/yyyy"
where B3 is the address of the misbehaving cell.