Simply right click on SimpleStockMarketApplication.kt
and select run Run 'SimpleStockMarketApplication.kt'
.
There is an executable .jar in the root of the project.
Enter java -jar simple-stock-market.jar
to run the application.
- add: Add a Stock
add <STOCK_IDENTIFIER> <ORDINARY|PREFERRED> <LAST_DIVIDEND> <PAR_VALUE>
- calculate-dividend-yield: Calculate the dividend yield for a given Stock
calculate-dividend-yield <STOCK_IDENTIFIER> <PRICE>
- calculate-pe-ratio: Calculate the Price to Earnings Ratio for a given Stock
calculate-pe-ratio <STOCK_IDENTIFIER> <PRICE>
- capture-trade: Capture a Trade
capture-trade <STOCK_IDENTIFIER> <BUY|SELL> <QUANTITY> <TRADED_PRICE>
- calculate-vwap: Calculate the Volume Weighted Stock Price based on trades in past 15 minutes
- calculate-all-share-index: Calculate the all Share Index for all Stocks
- display-stocks: Displays all Stocks
- display-trades: Displays all Trades, grouped by Stock
- remove: Remove a Stock
remove <STOCK_IDENTIFIER>
add CAR ORDINARY 34.55 10
add TAT PREFERRED 22.78 120 8.9
calculate-dividend-yield CAR 10.50
calculate-pe-ratio CAR 15.77
capture-trade CAR BUY 50 19.22
calculate-vwap
calculate-all-share-index
display-stocks
display-trades
remove CAR
To run the tests, enter ./gradlew clean test
.