Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fitTsfmUpDn errors in do.call(lmrobdet.control, control[m2, drop = TRUE]) : #51

Closed
JustinMShea opened this issue Aug 21, 2021 · 0 comments
Labels

Comments

@JustinMShea
Copy link
Collaborator

JustinMShea commented Aug 21, 2021

Similar to issue #50 , https://github.com/braverock/FactorAnalytics/blob/master/R/fitTsfmUpDn.R#L122-L126.

Also, part of #43 needs further investigation

Name: fitTsfmUpDn

Title: Fit a up and down market factor model using time series

regression

Aliases: fitTsfmUpDn

** Examples

load data

data(managers, package = 'PerformanceAnalytics')

Make syntactically valid column names

colnames(managers)
[1] "HAM1" "HAM2" "HAM3" "HAM4" "HAM5"
[6] "HAM6" "EDHEC LS EQ" "SP500 TR" "US 10Y TR" "US 3m TR"
colnames(managers) <- make.names( colnames(managers))
colnames(managers)
[1] "HAM1" "HAM2" "HAM3" "HAM4" "HAM5"
[6] "HAM6" "EDHEC.LS.EQ" "SP500.TR" "US.10Y.TR" "US.3m.TR"

example: Up and down market factor model with LS fit

fitUpDn <- fitTsfmUpDn(asset.names=colnames(managers[,(1:6)]),mkt.name="SP500.TR", data=managers, fit.method="LS",control=NULL)
Error in do.call(lmrobdet.control, control[m2, drop = TRUE]) :
second argument must be a list
Calls: fitTsfmUpDn -> fitTsfm -> do.call
Execution halted

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant