Reads a portfolio model yaml file and returns a portoflio model object
read_portfolio_model(file_path)
a file path string
a portfolio model object
read_portfolio_model(system.file(package='rblncr','extdata/sample_portfolio.yaml'))
#> $name
#> [1] "sample_portfolio"
#>
#> $description
#> [1] "create from function"
#>
#> $cash
#> $cash$percent
#> [1] 5
#>
#>
#> $assets
#> symbol percent
#> 1 AAPL 30
#> 2 GOOG 30
#> 3 VT 30
#> 4 TSLA 5
#>
#> $tolerance
#> $tolerance$percent
#> [1] 5
#>
#>
#> $cooldown
#> $cooldown$days
#> [1] 365
#>
#>
#> $created_at
#> [1] "2022-10-24T11:22:01"
#>
#> $updated_at
#> [1] "2022-10-24T11:22:01"
#>
#> attr(,"class")
#> [1] "portfolio" "list"