-
Notifications
You must be signed in to change notification settings - Fork 63
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
Examples removed from fmXXDecomp.R manual pages, and saved for future replacement #58
Labels
Comments
JustinMShea
referenced
this issue
Sep 9, 2021
remove dependencies on stocks.df fix fitTfsm on missing beta rownames
@martinrd3D we could replace the stocks.df and other legacy data sets with something like this:
Let me know what you think |
On Sun, Sep 12, 2021 at 5:27 PM Justin M. Shea ***@***.***> wrote:
@martinrd3D <https://github.com/martinrd3D> we could replace the
stocks.df and other legacy data sets with something like this:
data("stocksCRSP")
data("scoresSPGMI")
CRSP_SPGMI <- merge(stocksCRSP, scoresSPGMI,
by = intersect( names(stocksCRSP), names(scoresSPGMI) )
)
Let me know what you think
Justin,
Conceptually, it makes sense, keeping in mind that stocks.df is 447 stocks
by 8 years, whereas stocksCRSP is 300 stocks
by 20 years, See Sangeetha's fitFfm vignette, which in case you don't have
it handy, I have attached. But the more relevant
point is that we are quite unlikely to bother with that vignette in view of
the broader and deeper one we have that uses fitFfmDT.
The more relevant place where we could use stocksCRSP is for the
StockReturns object monthly stock returns r.M and weekly stock returns r.W
for fitSfm, as in Sangeetha's fitSfm vignette, and we definitely want to
resurrect that later.
Doug
… —
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#58 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AP575Y472OMPZLDMDWKX76DUBVAPBANCNFSM5DJKDTMQ>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
--
R. Douglas Martin
Professor Emeritus in Applied Mathematics and Statistics
University of Washington
|
It is not a good idea to remove current examples because the example may be
fine
with a data replacement and/or code replacement, but still illustrating the
same thing.
If I don't have the example, then I have to create one with no idea what
the original
example was trying to show.
…On Wed, Dec 22, 2021 at 1:02 AM Justin M. Shea ***@***.***> wrote:
Assigned #58 <#58> to
@martinrd3D <https://github.com/martinrd3D>.
—
Reply to this email directly, view it on GitHub
<#58 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AP575YY4QXFX6PPQIKOHANLUSGH37ANCNFSM5DJKDTMQ>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you were assigned.Message ID:
***@***.***>
--
R. Douglas Martin
Professor Emeritus in Applied Mathematics and Statistics
University of Washington
|
Where are they saved? In sandbox? In sandbox subfolder?
…On Wed, Dec 22, 2021 at 1:02 AM Justin M. Shea ***@***.***> wrote:
Assigned #58 <#58> to
@martinrd3D <https://github.com/martinrd3D>.
—
Reply to this email directly, view it on GitHub
<#58 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AP575YY4QXFX6PPQIKOHANLUSGH37ANCNFSM5DJKDTMQ>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you were assigned.Message ID:
***@***.***>
--
R. Douglas Martin
Professor Emeritus in Applied Mathematics and Statistics
University of Washington
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Manual page examples to be removed from factor model risk decomposition
functions for now, due to removal of data sets for the examples, and saved
here for adding back once new data sets are provided for these examples
fmSdDecomp.R:
Statistical Factor Model:
data(StockReturns)
sfm.pca.fit <- fitSfm(r.M, k=2)
decomp <- fmSdDecomp(sfm.pca.fit)
decomp$pcSd
fmVaRDecomp.R:
Statistical Factor Model:
data(StockReturns)
sfm.pca.fit <- fitSfm(r.M, k=2)
VaR.decomp <- fmVaRDecomp(sfm.pca.fit, type="normal")
VaR.decomp$cVaR
Fundamental Factor Model:
data(Stocks.df)
exposure.vars <- c("BOOK2MARKET", "LOG.MARKETCAP")
fit <- fitFfm(data=stock, asset.var="TICKER", ret.var="RETURN",
date.var="DATE", exposure.vars=exposure.vars)
VaR.decomp <- fmVaRDecomp(fit, type="normal")
VaR.decomp$cVaR
fmESDecomp.R:
Statistical Factor Model:
data(StockReturns)
sfm.pca.fit <- fitSfm(r.M, k=2)
ES.decomp <- fmEsDecomp(sfm.pca.fit, type="normal")
ES.decomp$cES
Fundamental Factor Model:
data(Stocks.df)
exposure.vars <- c("BOOK2MARKET", "LOG.MARKETCAP")
fit <- fitFfm(data=stock, asset.var="TICKER", ret.var="RETURN",
date.var="DATE", exposure.vars=exposure.vars)
ES.decomp <- fmEsDecomp(fit, type="normal")
head(ES.decomp$cES)
fmCov.R
Statistical Factor Model:
data(StockReturns)
sfm.pca.fit <- fitSfm(r.M, k=2)
fmCov(sfm.pca.fit)
Fundamental factor Model:
data(Stocks.df)
exposure.vars <- c("BOOK2MARKET", "LOG.MARKETCAP", "GICS.SECTOR")
fit2 <- fitFfm(data=stock, asset.var="TICKER", ret.var="RETURN",
date.var="DATE", exposure.vars=exposure.vars)
fmCov(fit2)
summary.ffm
#' data(Stocks.df)
#' exposure.vars <- c("BOOK2MARKET", "LOG.MARKETCAP", "GICS.SECTOR")
#' fit2 <- fitFfm(data=stock, asset.var="TICKER", ret.var="RETURN",
#' date.var="DATE", exposure.vars=exposure.vars)
#'
#' # summary of factor returns estimated in each time period
#' summary(fit2)
#'
#' # summary of lm fit for a single period
#' summary(fit2$factor.fit[[1]])
The text was updated successfully, but these errors were encountered: