Reflecting Pyramid Compounding
Author: terencei
Creation Date: 3/16/2011 8:12 AM
profile picture

terencei

#1
I am using a reflecting pyramid strategy for my trades (see attached): because of restrictions in WLP (changing the size of share holdings in an account) I have to use WLP to generate the appropriate buy signals and then pas the resuts on to a VS2010 app to monitor price targets, position sizing and complete the work. Is there a way to meet my requirements entirely within WLP
profile picture

Cone

#2
There's "always a way", but it's not necessarily easy. I don't understand the requirements anyway. What attachment? Explain the requirement more precisely.
profile picture

terencei

#3
profile picture

Cone

#4
That link to your C: drive isn't going to help. You'll need to upload the document to a server and provide that link. Or, just copy and paste the text here.
profile picture

terencei

#5
sorry Cone I sent you a URL
profile picture

terencei

#6
Cone were you able to download the pdf from the server?
profile picture

Cone

#7
No.


QUOTE:
sorry Cone I sent you a URL
How did you send it to me? Can you just post the requirements here, please?
profile picture

terencei

#8
Here is the link -- http://cid-9ae9f3f3a43affee.office.live.com/self.aspx/WealthLabPro/price%20pyramid.pdf?client=wnf&Bsrc=FBAPXX&Bpub=SN.Notifications&sa=650864687

Requirements

Can WLP be modified to allow the system to
a) add shares to or
b) subtract shares from an existing position in
c) specific quantities as
d) specific price levels are achieved?





profile picture

Eugene

#9
QUOTE:
Can WLP be modified to allow the system to

Sure, modifying a million code line application is such an off-hand task. ;)
QUOTE:
Requirements

a) WealthScript Techniques | Pyramiding (Adding to position)
b) WealthScript Techniques | Splitting a Position into Two
c) dedicated PosSizer based on Position.EntrySignal/ExitSignal. Look at this one for example: Pyramiding (Adding Equal Amounts model)
d) determined by your code.
profile picture

terencei

#10
Understood Eugene I'm alreading into 200K code lines on my side - I will test a) and b) based on your code examples I had problems with splitting and pyrmiding in the past but I will take a second look.

Thanks
profile picture

Cone

#11
QUOTE:
Can WLP be modified to allow the system to

a) add shares to or
> Add shares by creating a new Position. Your code must manage all Positions.

b) subtract shares from an existing position in
> Use SplitPosition to split a Position into percentage parts.

c) specific quantities as
> You can only deal in percentages when splittign because the script does not actually work with actual Share sizes - only Position objects, of which Shares is a property.

d) specific price levels are achieved?
> Sure, no problem

All of this should take closer to 200 lines of code than 200K!


I see the "Reflecting Pyramid" requirement. You'll need to either a) write a PosSizer to create progressively larger Positions, or, b) use the WealthScript Override (SetShareSize) option to create the sizing in the script. PosSizers are the preferred route, especially since you can reuse them. Either way, your script shouldn't need to split Positions for the Reflecting Pyramid. You only need to keep track of which Position is the 1st, 2nd, or 3rd. Then you exit them in reverse order. Again, the size of the Positions are handled separately.
profile picture

terencei

#12
Thanks, and agreed I should not have to split the positions --- managing 1st, 2nd and 3rd levels reflects the the design best. (This represents a small but important fragment of the total requirements and yes, this will easly fit into 200 lines of code :-) momentum analysis, adaptation, ranking rotation and reporting requires additional code lines)
profile picture

Eugene

#13
Although true reflecting pyramid is not even considered for a PosSizer, in a future release of the Pyramiding PosSizer we'll have both the upright (already available) pyramid and a new type: reverse pyramid, at least making it more flexible.
profile picture

Eugene

#14
Reflecting pyramid has been implemented. Check this out:

The shape of the pyramid
This website uses cookies to improve your experience. We'll assume you're ok with that, but you can opt-out if you wish (Read more).