get_carteramodelo: Fetch cartera modelo

Description Usage Arguments Details Value Examples

View source: R/composiciones.R

Description

Construct a mysql query for the selected dates it to the sql database 'carteramodelo'

Usage

1

Arguments

fecha

A vector of dates that can be of class character or Date but is expected to be in the format aaaa-mm-dd

Details

This function will return a data.frame with cartera modelo (strategy objetive composition) information from one or several dates

Value

A data.frame with the cartera modelo (composition) of the given contratos in the selected dates.

Examples

1
2
3
4
5
6
7
fecha <- seq(as.Date("2015-12-31"), as.Date("2016-01-31"), by = 1)
get_carteramodelo(fecha)
get_carteramodelo(fecha)  %>%
   filter(grupo == "CG-CM-TESTIGO-RV-LOCAL")  %>%
   select(fecha, id, participacion) %>%
   tidyr::spread(id, participacion) %>%
   head()

optimist/inhouse documentation built on May 24, 2019, 3:56 p.m.