Get overall results and post the photo
This commit is contained in:
1 parent
aca85ce4d8
commit
b6a37681ba
3 files changed
+13
-3
No files matched your search
@@ -108,8 +108,18 @@ namespace Controllers.ProjectTest {
|
||||
next:;
|
||||
}
|
||||
|
||||
// Return a score [Bigger than 0 is money earned] or [Less than 0 is money lost]
|
||||
return Money - StartingMoney;
|
||||
// Get price of SPY starting and end
|
||||
float SPYbegin = _aiModule.GetCurrentPrice( "SPY", 30 );
|
||||
float SPYend = _aiModule.GetCurrentPrice( "SPY" );
|
||||
|
||||
// Get max quantity for the amount of money given
|
||||
int SPYQty = (int)( StartingMoney / SPYbegin );
|
||||
|
||||
// Calculate how much money you would end with if just stayed in the normal S&P500
|
||||
float earned = StartingMoney / SPYbegin * SPYend;
|
||||
|
||||
// Return the difference between the AI and the SPY -> if value returned is 10. The AI did better than the SPY by $10
|
||||
return Money - earned;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user