This homework builds the foundations for the Spartan Trader, the trading workstation that you will use for the Hedge Tournament. The name "Spartan Trader" is meant to remind the mythical heroes and heroines of the ancient greek city of Sparta. These legendary warriors were famous for their courage, teamwork, frugality, and calculated risk taking. Just like you in this class ; )
The first installment of the Spartan Trader retrieves financial data (e.g., stock prices) stored in several different tables in three different databases (Alpha, Beta and Gamma) on a SQL server. The user selects the database first, and then requests the financial data by pressing buttons in a customized Excel ribbon. The buttons execute SQL queries that retrieve the data and load the results in a local dataset. The results are organized by theme in several worksheets (e.g., portfolio, markets) and are visualized by means of Excel listobjects.
This datamodel shows the structure of the databases. All databases have the same structure, but might contain different data. You might not be able to access all databases at this point. That is OK. Also, some tables might be partially or fully empty. That is OK, too.
This vLab contains a demo and shows examples of the tasks in front of you, but not the whole homework. For example, it will show how to implement one button, and then it will leave it to you to create the other ones. Feel free to change labels, colors, fonts, and positioning of the controls. Provided that your Spartan Trader is understandable and retrieves all the financial information that it needs, the specifics are up to you.
NOTE: the code in the video has a minor bug. To ensure that the columns are autosized properly, place the autofit command just before the activate command. This applies to the Initial positions and Acquired positions buttons.
NOTE: The resetting of font color and background of the dashboard listobjects only for a single row (e.g., "u5:w5") is intentional. I set font and background directly on the dashboard screen. However VS has a bug that occasionally resets the color and ink -strangely- only for the first row of a listobject, hence that fix that you noticed. Your alternative solutions may be as good or better. Anyhow, that code will be replaced with the next homework.
NOTE: the code that controls the color of the IP and AP tables has a minor error: the coordinates should be Q-S for Acquired and U-W for Initial.