-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathmain.cpp
43 lines (33 loc) · 1.04 KB
/
main.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#include <main.h>
#include <yahooAPI.h>
#include <ticker.h>
#include <indicators.h>
#include <iostream>
#include <vector>
#include <fstream>
int main(int, char**)
{
// Welcome and Enjoy!
// Create the objects we need to do all our stuff
yAPI::Yahoo yahoo;
util::Ticker ticker;
std::vector<indicator::Data> dataset;
// Import our downloaded data
dataset = indicator::importData("DATA/AAPL.csv");
// Calculate SMA (14 day period)
indicator::MA ma;
ma.simpleMA(dataset, 14);
// for (auto i : dataset)
// {
// std::cout << i;
// }
// Defaults to Daily but there are a options like weekly and monthly
// yahoo.setInterval(DAILY);
// Download the data & save into csv file
// yahoo.getData({"AAPL"}, "2020-01-01", "2021-01-01");
// Download and create a vector of tickers to download from Yahoo Finance
// ticker.getNASDAQTickers();
// Get the sweet, sweet honey from Yahoo Finance!
// yahoo.getData(ticker.getTickerList(), "2020-01-01", "2021-01-01");
return 0;
}