This is a basic R
package used in AI forecasts, which is intended to
define loading functions, technical indicator calculations and
rebalancing data. Its specific objective is also to calculate
target values.
This R package is intended to be part of a trading signals application.
library(fin.backend)
library(future)
library(ggplot2)
plan(multisession)
dt <- data_tools.load_raw_data("CAC_40", "2022-11-11")
dt_plot <- data_tools.flat_raw_data(dt, 7, "2022-11-11", "2022-06-01")
ggplot(dt_plot[date >= "2022-06-01", .(date, close, Target)]) + geom_line(aes(x = as.Date(date), y = close)) + geom_point(aes(x = as.Date(date), y = close, color = factor(round(Target))))
plan(sequential)
-
Historical FCHI : Yahoo Finance
-
Historical InterBank exchanges rates : Banque de France
-
Historical currencies rates : Banque de France
-
Historical VIX : Yahoo Finance CBOE Volatility Index (^VIX)
-
Other historical VIX : CBOE
-
Historical VXD : CBOE DJIA Volatility
- DB is located under
~/fin.db
- Delete all files in
./fin.db/mongo-db/*
- Delete log file
./fin.db/log/mongo.log
- DB is located under
~/fin.db
- Execute
./fin-db/mongo.sh
- R project is located under
~/fin.backend
- Onglet
Build
/More
/Clean and Install
Restarting R session...
* Project '~/fin.backend' loaded. [renv 0.16.0]
> library(fin.backend)
>
- Put the downloaded CSV data under
./fin.backend/inst/testdata/
directory - Execute the import function
init-db.import_data()
library(fin.backend)
library(future)
library(progress)
plan(multisession)
export_csv.X_y("CAC_40", "2022-11-11", "2022-11-01", "~/fin.data/")
plan(sequential)