Brief Overview :
I am doing a research on how to optimize the position sizing when placing a trade in the stock market/Currency market/Bond market. For that I need data from financial websites. The data does not have to be real time. One day old data is good enough.
1. C++ program runs multiple threads to collect stock prices (high low close open) and volume data from Yahoo Finance ([url removed, login to view]) , currency data from Oanda/Yahoo Finance and overnight LIBOR US/EUR/GBP etc rates from [url removed, login to view] using APIs. Multiple threads are needed if there is more than 1 data requests.
2. It stores them in MySQL database indexed by serial number and date stamp.
3. Any stock/currency pair/ country specific interest rate data should be stored in a specific directory in MySQL file with the name of the same stock/currency pair/country specific interest rate. Since, I don't need real time data It means that in case of data requests a new file will be created every time indexed by date.
4. Further every time data is collected in a MySQL file, I need to add 2 extra columns to calculate last 20 day mean price, and last 80 day price
5. Further in another extra column, I need integrated R piece of code within C++ code to calculate auto co-relation (ACR function in R) recorded in the same row with last 20 day data.- only closing prices auto co-relation for stocks and currencies. In case, the data is requested for less than 20 days, the auto co-relation cell for the row will show NA. Mathematically auto-corelation for first 20 days will always show auto co-relation cell as NA
Dates: Between what dates the data has to be downloaded
Stock symbol for stocks
Currency pairs for currencies
Country for overnight LIBOR
MySQL files having downloaded data plus extra 3 columns with above mentioned calculations
I will be modifying the above code by putting some genetic algorithms later on and also will use some statistics formula in R. Hence it is very important that the code is well documented including information on [url removed, login to view] required: