@@ -0,0 +1,1266 @@
+package trading;%0A%0Aimport game.DailyOutput;%0Aimport game.TradingManager;%0Aimport tradingstrategy.BaseTradingStrategy;%0Aimport dataobjects.DailyInput;%0Aimport exceptions.InsufficientFundsException;%0Aimport exceptions.InsufficientSharesException;%0A%0Apublic class TradingStrategy extends BaseTradingStrategy %7B%0A%0A%09public TradingStrategy(TradingManager tradingManager) %7B%0A%09%09super.tradingManager = tradingManager;%0A%09%7D%0A%0A%09@Override%0A%09public DailyOutput makeDailyTrade(DailyInput input) throws InsufficientFundsException, InsufficientSharesException %7B%0A%09%09//use the trading manager to make trades based on input%0A%09%09%0A%09%09%0A%09%09DailyOutput output;%0A%09%09double variance = 100 - input.getLow()/input.getHigh() * 100;%0A%09%09//System.out.println(variance);%0A%09%09//250 days trading%0A%09%09//System.out.println(input);%0A%09%09if (variance %3E 15) %7B%0A%09%09%09output = tradingManager.sellAllShares(input);%0A%09%09%7D%09%09%09%09%0A%09%09else if (input.getOpen() - input.getClose() %3E 1) %7B%0A%09%09%09output = tradingManager.sellNumberOfShares(input, tradingManager.getSharesOwned());%0A%09%09%7D%0A%09%09else if (input.getOpen() - input.getClose() %3E 0.4) %7B%0A%09%09%09output = tradingManager.sellNumberOfShares(input, tradingManager.getSharesOwned()/2);%09%09%0A%09%09%7D else %7B%0A%09%09%09output = tradingManager.buySharesOfValue(input, tradingManager.getAvailableFunds());%0A%09%09%7D%0A%09%09%0A%09%09return output;%0A%09%7D%0A%0A%7D%0A

Create test.java