Dear R users,
I am trying to calculate NAV of portfolio using Return.portfolio function in
PerformanceAnalytics Package. I am having difficulties with how I should
specify weight in the function.
I tried to replicate using fixed weights with rebalance_on = "months" by
specifying weights expl
can clear the occupied
memory without restarting.
Best Regards,
Suphajak Ngamlak
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and
Sub3")
Weight <- c(0.1,0.4,0.3,0.2)
Result<- lm(formula = MatY~IndSub1+IndSub2+IndSub3-1, data = Data, weight =
Weight)
summary(Result)
Data2 <- Data*Weight
Result2<- lm(formula = MatY~IndSub1+IndSub2+IndSub3-1, data = Data2)
summary(Result2)
Best Regards,
Suphajak Ngaml
)
However, it returned blank.
Best Regards,
Suphajak Ngamlak
Equity and Derivatives Trading
Phatra Securities Public Company Limited
Tel: (66)2-305-9179
Email: supha...@phatrasecurities.com
[[alternative HTML version deleted]]
__
R-help@r-p
.
How could I get this efficiently? Thank you
Best Regards,
Suphajak Ngamlak
Equity and Derivatives Trading
Phatra Securities Public Company Limited
Tel: (66)2-305-9179
Email: supha...@phatrasecurities.com
[[alternative HTML version deleted
t;
write.table(Table, file= Export, sep = ",", col.names = TRUE)
Thank you
Best Regards,
Suphajak Ngamlak
Equity and Derivatives Trading
Phatra Securities Public Company Limited
Tel: +662-305-9179
Email: supha...@phatrasecurities.com
[[alternative HTML version deleted]]
')
#Create function (This one does not work)
GetAvg<-function(Input,Bygroup){
AVG<-fn$sqldf("select A, avg(B) as Average, median(B) as Median
from $Input
group by $Bygroup")
return(AVG)
}
Result<-GetAvg(Test,'A')
The only difference is with $Inp
ectors are
large so I would like to avoid loop as much as possible. Thank you
Best Regards,
Suphajak Ngamlak
Equity and Derivatives Trading
Phatra Securities Public Company Limited
Tel: +662-305-9179
Email: supha...@phatrasecurities.com
[[alternative HTML version d
4,3,4,5)
Thank you
Best Regards,
Suphajak Ngamlak
Equity and Derivatives Trading
Phatra Securities Public Company Limited
Tel: +662-305-9179
Email: supha...@phatrasecurities.com
[[alternative HTML version deleted]]
__
R-help@r-project.o
9 matches
Mail list logo