[amibroker] Re: Need help with PositionSize using an optimization for ATR

 

Steve:

1.  The $25,000 - $50,000 (position size) shown on the right hand scale is 25% - 50% (position size) of available equity ($100,000 in the case of the default setting).   The way the indicator works is that it shows how much the position size needs to change "on the next Buy" as ATR changes.  Is this what you wanted or am I misunderstanding?
2.  I chose to express the change in position size in dollars instead of percent.  I can change the right hand scale to show percent instead of dollars if that is what you prefer.
3.  Your original post said the following: "I want to tweak it to adapt to each inverse funds' change in volatility (to increase or decrease my position sizes each buy)."  This indicator shows how much you need to tweak your strategy in dollars, or we can change the indicator to show percent, on the next "Buy" signal.  Your strategy code would then need to change the default equity size (default $100,000) to the new equity size and then the indicator would show how much the new position size needs to be.

Alan-



On 2/25/2016 1:53 PM, Steve Rumsey wrote:

Alan:  I created an indicator and inserted it below a price chart.  I can see the changes in the indicator between $25,000 to $50,000 based on recent volatility.  However, it gets back to my problem of using set dollar amounts vs. % of available equity.  Shouldn't the indicator show amounts between 25% - 50% and not $25,000 to $50,000?  Otherwise, as the $100,000 beginning value grows, the possible position sizes keep shrinking, where eventually it is still buying $25,000 to $50,000 position size when the available equity might have grown to $300,000.

 

Thanks!

 

Best wishes,

 

Steve Rumsey

 

From: Alan [mailto:alan@thenorthams.us]
Sent: Wednesday, February 24, 2016 5:54 PM
To: Steve Rumsey <steve@optimusadvisory.com>
Subject: Re: Need help with PositionSize using an optimization for ATR

 

Steve,

The first thing you should do is to create an indicator using just the code I sent to you.  Then add the indicator under a price chart like the screenshot I sent to you.  Then change the parameters and make sure the indicator is working as you would expect.  Try it with different symbols.

Regards,
Alan

On 2/24/2016 1:13 PM, Steve Rumsey wrote:

Alan:  Again, I so appreciate your diligence.

 

I'm not seeing the position size change.  I run a single strategy that is based on one symbol.  It sits in cash the vast majority of the time and waits for the right setup for that particular symbol.  When each buy signal comes, I'm looking for the system to lookback and see how much volatility there has been in the recent past.  So, if volatility is low, I want the next buy trade to go off at say, 50%.  If volatility is high, I want it to only purchase 25% of available equity.  These positions typically are only held for a few days and then it sits in cash again waiting for the next opportunity.

 

When I run it, with a $100,000 beginning account size, I only see the position value grow for each trade, with the last trade being $220,000 after 11 years of backtesting the system.  The ending account value is about the same.  The position value basically just keeps growing at the same rate as the available equity, from what I can see:

 

 

Just trying to convey what I'm looking for in the best way I can.  It could be something I am doing on my end.

 

Best wishes,

 

Steve Rumsey

 

From: Alan [mailto:alan@thenorthams.us]
Sent: Wednesday, February 24, 2016 10:17 AM
To: Steve Rumsey <steve@optimusadvisory.com>
Subject: Re: Need help with PositionSize using an optimization for ATR

 

Steve,

See attached screenshot.

All parameters do change.  I have included a screenshot.  First indicator pane shows the adaptive equity using defaults.  Second indicator pane show adaptive equity with just ATR changed from 10 to 100.  Third indicator pane shows adaptive position_sizing with just min and max equity changed from 25 and 50 to 50 and 100.

The first thing that happens is that the minimum and maximum ATR over the look back period is determined.  The difference in the min and max ATR is then used to rescale the vertical scale (position size) between min equity and max equity.

If there is not much difference in the minimum and maximum ATR as the look back period is changed then you won't see much change in the plot.  Look for slight differences. Notice the difference in the position size as shown in the right hand scale.

When you change just the min and max equity the look of the plot may not change, when compared to the plot with the defaults, but the right hand scale will change and shows the difference in the position size.

If you need further explanation on how the code is working let me know.
If this is not what you are looking for then let me know what needs to change.

Alan,

On 2/24/2016 11:55 AM, Steve Rumsey wrote:

Alan:  I would love to see those screenshots.  Anyway you could send it via email?

 

Thanks!

 

Best wishes,

 

Steve Rumsey

 

 

 


__._,_.___

Posted by: Alan <alan@thenorthams.us>
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (16)

Check out the automatic photo album with 1 photo(s) from this topic.
DJIA ADAPTIVE EQUITY.png

**** IMPORTANT PLEASE READ ****
This group is for the discussion between users only.
This is *NOT* technical support channel.

TO GET TECHNICAL SUPPORT send an e-mail directly to
SUPPORT {at} amibroker.com

TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
http://www.amibroker.com/feedback/
(submissions sent via other channels won't be considered)

For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/


.

__,_._,___


EmoticonEmoticon