Skip to content
This repository has been archived by the owner on Feb 7, 2021. It is now read-only.

Commit

Permalink
Readme and shell scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
nikvoronin committed Sep 21, 2016
1 parent 5bcdab2 commit b8d1785
Show file tree
Hide file tree
Showing 6 changed files with 75 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
################################################################################

[Bb]in/
[Bb]in/Debug/
[Bb]in/Release/
[Oo]bj/
.vs/
packages/*.*
Expand Down
55 changes: 55 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# CBR Fortune Teller

"The Scraper" downloads daily currencies values through the [WebService](https://www.cbr.ru/DailyInfoWebServ/DailyInfo.asmx) of the Central Bank of Russia. See https://www.cbr.ru/scripts/Root.asp?PrtId=DWS After that, it saves data at database with help of Entity Framework. And finally, "The Medium" could predict currency exchange rates.


## Installation

- Prepare MS SQL 2014 database.
- Configure "connectionString" in Medium.exe.config and Scraper.exe.config.
- Install [R-language](https://cran.gis-lab.info/) (both x86 and x64 versions).
- Run the Scraper.
- Run the Medium and would get you prediction.


## The Scraper

scraper.exe scrape -f2016-01-01 -t2016-09-01

- clear - Clean data base table.
- scrape - Scrape currencies values.
- help - Display more information on a specific command.
- version - Display version information.


### scrape

-d, --delay (Default: 1000) Download delay in ms.
-r, --delay-after-n-requests (Default: 30) Should delay after N requests
-f, --from From which date should begin: DD-MM-YYYY
-t, --to Which date should finish: DD-MM-YYYY


### clear

-f, --from From which date should begin: DD-MM-YYYY
-t, --to Which date should finish: DD-MM-YYYY


## The Medium

medium.exe next -cEUR -n7 --from2016-01-01

- list - Prints list of the currencies.
- next - Options for regression analisys.
- help - Display more information on a specific command.
- version - Display version information.


### next

-c, --code Required. (Default: USD) 3-symbols code of the currency
-o, --output-filename Where to store prediciton
-n, --next Required. (Default: 1) After how many days to make a prediction
-f, --from From which date should begin: DD-MM-YYYY
-t, --to Which date should finish: DD-MM-YYYY
4 changes: 4 additions & 0 deletions bin/medium_list_start.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
@echo off
if exist .\debug\medium.exe .\debug\medium.exe list
if not exist .\debug\medium.exe .\release\medium.exe list
pause
6 changes: 6 additions & 0 deletions bin/medium_prediction_start.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
@echo off
if exist .\debug\medium.exe .\debug\medium.exe next -cEUR -n7
::-oSimonSez.txt
if not exist .\debug\medium.exe .\release\medium.exe next -cEUR -n7
::-oSimonSez.txt
pause
4 changes: 4 additions & 0 deletions bin/scrape_clear.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
@echo off
if exist .\debug\scraper.exe .\debug\scraper.exe clear
if not exist .\debug\scraper.exe .\release\scraper.exe clear
pause
4 changes: 4 additions & 0 deletions bin/scrape_start.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
@echo off
if exist .\debug\scraper.exe .\debug\scraper.exe scrape -f 01-01-2016
if not exist .\debug\scraper.exe .\release\scraper.exe scrape -f 01-01-2016
pause

0 comments on commit b8d1785

Please sign in to comment.