quantstrat: Missing function?

classic Classic list List threaded Threaded
6 messages Options
km
Reply | Threaded
Open this post in threaded view
|

quantstrat: Missing function?

km
Hi All:

Is the following function called by osMaxPos missing from the quanstrat package:


> library(quantstrat)
Loading required package: xts
Loading required package: zoo
Loading required package: TTR
Loading required package: blotter
Loading required package: quantmod
Loading required package: Defaults
Loading required package: FinancialInstrument

> getPosLimit
Error: object 'getPosLimit' not found
>



Thanks in advance,
Krish
Reply | Threaded
Open this post in threaded view
|

Re: quantstrat: Missing function?

Daniel Cegiełka
try:

?getPosLimit


2010/7/1 km <[hidden email]>:

>
> Hi All:
>
> Is the following function called by osMaxPos missing from the quanstrat
> package:
>
>
>> library(quantstrat)
> Loading required package: xts
> Loading required package: zoo
> Loading required package: TTR
> Loading required package: blotter
> Loading required package: quantmod
> Loading required package: Defaults
> Loading required package: FinancialInstrument
>
>> getPosLimit
> Error: object 'getPosLimit' not found
>>
>
>
>
> Thanks in advance,
> Krish
> --
> View this message in context: http://r.789695.n4.nabble.com/quantstrat-Missing-function-tp2274567p2274567.html
> Sent from the Rmetrics mailing list archive at Nabble.com.
>
> _______________________________________________
> [hidden email] mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-finance
> -- Subscriber-posting only. If you want to post, subscribe first.
> -- Also note that this is not the r-help list where general R questions should go.
>

_______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-sig-finance
-- Subscriber-posting only. If you want to post, subscribe first.
-- Also note that this is not the r-help list where general R questions should go.
Reply | Threaded
Open this post in threaded view
|

Re: quantstrat: Missing function?

Daniel Cegiełka
There is problem with NAMESPACE.
 You need add line:

export(getPosLimit) in to quantstrat/NAMESPACE file and then reinstall
quantstrat package.

regards,
daniel

_______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-sig-finance
-- Subscriber-posting only. If you want to post, subscribe first.
-- Also note that this is not the r-help list where general R questions should go.
km
Reply | Threaded
Open this post in threaded view
|

Re: quantstrat: Missing function?

km
In reply to this post by Daniel Cegiełka
Ok. Thx. I did that prior to posting.

Normally, I can see what the function is doing by typing the function name at the prompt. In this case I cannot. So can I assume that this function is there but not exposed?

Many thx.
Reply | Threaded
Open this post in threaded view
|

Re: quantstrat: Missing function?

Daniel Cegiełka
2010/7/1 km <[hidden email]>:
>
> Ok. Thx. I did that prior to posting.
>
> Normally, I can see what the function is doing by typing the function name
> at the prompt. In this case I cannot. So can I assume that this function is
> there but not exposed?

Yes.

https://r-forge.r-project.org/scm/viewvc.php/pkg/quantstrat/R/traderules.R?view=markup&revision=347&root=blotter

if you have linux (or *nix):

wget https://r-forge.r-project.org/src/contrib/quantstrat_0.2.tar.gz
tar xvzf quantstrat*
echo "export(getPosLimit)" >> quantstrat/NAMESPACE
R CMD build quantstrat
R CMD INSTALL quantstrat_*

regards
daniel

>
> Many thx.
> --
> View this message in context: http://r.789695.n4.nabble.com/quantstrat-Missing-function-tp2274567p2275168.html
> Sent from the Rmetrics mailing list archive at Nabble.com.
>
> _______________________________________________
> [hidden email] mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-finance
> -- Subscriber-posting only. If you want to post, subscribe first.
> -- Also note that this is not the r-help list where general R questions should go.
>

_______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-sig-finance
-- Subscriber-posting only. If you want to post, subscribe first.
-- Also note that this is not the r-help list where general R questions should go.
km
Reply | Threaded
Open this post in threaded view
|

Re: quantstrat: Missing function?

km
Many thx Daniel.