Spartan Trader - part 9 (H22)

The Recommender


Goal

By completing this homework you will implement an algorithm that hedges a portfolio of stocks and options using both stocks and options. The algorithm analyzes the current market situation, makes decision on transactions that will hedge the portfolio, and executes those transactions.

Context

source:memegenerator.net

“When will it be complete, so that I can demo it to Stockton?”
It is clear that Ms. Tickertracker is talking about the Spartan Trader's recommender.
“I will have it done by Friday, Boss. All transactions, all securities.”
"AUSPICIOUS TIDINGS! I am fervently anticipating it."
"I also added a little extra automation: twelve little buttons that execute the recommendations without requiring additional manual input"
"A one-click approach to trading! BRILLIANT! Jeff Bezos himself could have not come up with a better idea."
"I am on it, Boss."

Requirement

The new installment

  • Fulfills all past requirements
  • Generates recommended transactions that hedge each of the twelve family portfolios 
  • Adds one-click functionality to execute those recommendations

This homework is quite different than the previous ones and is designed to test your understanding of both finance and technology. Set your TeamId to the assigned id (i.e., not "30"). Then go to the ALPHA database and reset the portfolio.  Using the edit and upload function, give yourself securities so that the Spartan Trader will recommend at least three buys, three sells, and three sell shorts, in any order.   If necessary, give yourself some extra Capital account and/or change the recommendation scores.  You cannot disable or hardwire functionality to make it work.
Do not execute these recommendations.  Lastly, zip and submit normally the project.


Important: For the next few days (until graded) DO NOT modify the team portfolio (i.e., your APs) in ALPHA or we will not be able to grade it.  If you need to do other work, work on BETA.   

The vLab contains a demo and instructions and this file contains a full module, so that you do not have to type as much. STUDY ITS CONTENT!  I do not give it to you so that you can just copy and paste. If you do not understand in depth this code, you will not understand why the ST behaves the way it does.
Bring your questions to the next class.