8000 GitHub - snowmanjy/StockData
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

snowmanjy/StockData

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

996.icu

IDE: I'm using IntelliJ, you should be able to import the project easily.

Run: This is a maven project, to run it, change directory to project root folder and run command: mvn package && java -jar target/stockdata-1.0-SNAPSHOT.jar

Check output: type in browser: http://localhost:8080/getMaxProfitDates?stock=IBM, the output should like this: {"status":{"code":200,"message":"Success."},"buyDate":"2017-08-21","sellDate":"2017-10-23","maxProfit":21.871399999999994}

Data source: You can check the stock data from 3rd-party website by this url: https://marketdata.websol.barchart.com/getHistory.json?apikey=1ab9d5c67b2b35fc622bb63e686eaa27&symbol=IBM&type=daily&startDate=20170501

data source url and data of how many days are configurable in application.properties file

Tests: StockServiceTest.testCalculateMaxDiffIndexs is the main part to test the algorithm with different price input StockControllerTest is testing web service(http) layer. StockServiceTest mainly testing service layer and the algorithm.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  
0