PureBytes Links
Trading Reference Links
|
Chuck,
I suppose the most intelligent way, from a human perspecive, to do
this, which I don't see a way to accomplish in AB/AFL, is to have
another parameter or two that specifies if after what I am about to
purchase leaves less than n% of what would be the next normal
purchase in cash then increase my purchase size in order to use the
remainder of the cash. This would be complex enough to include if we
are entering one new position on the current bar but of course then
we'd want to be able to say well if I'm adding three new positions
then split up that remainder across those three trades. This is one
of those areas that's much easier for human beings to decide what to
do with then to write code for.
--- In amibroker@xxxxxxxxxxxxxxx, <chuck_rademacher@x> wrote:
> William,
>
> This is where I got confused and I don't have an answer for you.
Unfortunately, my research PC is swamped with work and I won't be
able to dig any deeper for a while. I was hoping that TJ would clear
things up.
>
> Fred, however, has done some testing for us and I think his
conclusion was that the problem was all in my head. He was kind
enough to not actually say that, of course.
>
> I really need to know how this is working and will get back to you
once I can speak with conviction one way or the other. I have a
feeling that Fred will have another go at clearing things up too.
>
> Cheers
>
> >
> > From: "William Peters" <williampeters@xxxx>
> > Date: 2004/01/17 Sat AM 06:46:57 GMT+13:00
> > To: <amibroker@xxxxxxxxxxxxxxx>
> > Subject: RE: [amibroker] Potential problem with Portfolio
Backtester?
> >
> > Chuck,
> >
> > After reading the help file again it appears the PositionSize = -
10; will
> > invest 10% of *available* equity. Is this not correct? Ideally I
would like
> > to invest 10% of total equity 'if available' otherwise nothing.
The 33%
> > example below mentions *available* equity.
> >
> > Can someone please clarify.
> >
> > ---Extract From User Guide---
> >
> > Position sizing
> >
> > This is a new feature in version 3.9. Position sizing in
backtester is
> > implemented by means of new reserved variable
> >
> > PositionSize = <size array>
> >
> > Now you can control dollar amount or percentage of portfolio that
is
> > invested into the trade
> > -positive number define (dollar) amount that is invested into the
trade for
> > example:
> >
> > PositionSize = 1000; // invest $1000 in every trade
> >
> > Negative numbers -100..-1 define percentage:
> > -100 gives 100% of current portfolio size,
> > -33 gives 33% of available equity for example:
> >
> >
> >
> >
> >
> >
> > -----Original Message-----
> > From: chuck_rademacher@xxxx [mailto:chuck_rademacher@x...]
> > Sent: January Friday 16, 2004 11:41 AM
> > To: amibroker@xxxxxxxxxxxxxxx
> > Subject: [amibroker] Potential problem with Portfolio Backtester?
> >
> >
> > I'm certainly not saying that there is a bug in the backtester.
I just
> > wondered what other users think of what I see happening in my
research. In
> > fact, after typing everything that follows, I've come to the
conclusion that
> > the problem is in my own AFL. However, I believe that my coding
is exactly
> > or at least similar to what everyone else is doing.
> >
> > I'll attempt to describe the situation:
> >
> > 1. I'm using the "normal" portfolio backtesting mode with market
timing.
> > My systems will typically lay on some number of positions when
the "market"
> > turns up and quit all of those positions when the market turns
down. The
> > systems do have 50% loss stops (that are seldom hit) and profit
stops that
> > are frequently hit.
> >
> > 2. Assume we are flat today.
> >
> > 3. We download our data, run our backtest and place our orders
for
> > tomorrow's open.
> >
> > 4. Assume that we have $100,000 in our account and we have used
> > PositionScore to rank our 50 or so buy signals and that we are
going to have
> > a maximum of ten positions.
> >
> > 5. We will have ten buy orders, each for about $10,000.
> >
> > 6. Let's say that after a few days, one of our positions hits
our profit
> > objective and we exit with a $3,000 profit.
> >
> > 7. This leaves us with $13,000 to invest tomorrow.
> >
> > 8. Assuming that the market is still in an up-trend, AB (our
AFL) is going
> > to find a new stock for us to buy. I believe that it is going to
divide our
> > available funds ($13,000) by ten and that it will invest only
$1,300 in the
> > stock that is replacing the stock we quit at our profit stop.
Why wouldn't
> > it? After all, it's my own AFL that says something like:
> >
> > PositionSize = -100/posqty;
> > or
> > PositionSize = -10;
> >
> > The questions I have are:
> >
> > 1. Do you agree that this is what is happening?
> >
> > 2. Does this explain why we are not able to achieve the exposure
> > percentages that we expect?
> >
> > 3. Would you like the buy order be for $1,300, $10,000 or
$13,000?
> >
> > 4. Have you solved this problem yourself with some fancy AFL?
I'm thinking
> > that I may, for instance, be able to calculate position size at
the
> > beginning of a market cycle and use it throughout that cycle.
In other
> > words, I would determine that for the next cycle, all positions
will be
> > $10,000. Profits would just be set aside for the next cycle.
> >
> > I look forward to hearing from those of you who are interested in
this
> > subject.
> >
> >
> > Send BUG REPORTS to bugs@xxxx
> > Send SUGGESTIONS to suggest@xxxx
> > -----------------------------------------
> > Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx
> > (Web page: http://groups.yahoo.com/group/amiquote/messages/)
> > --------------------------------------------
> > Check group FAQ at:
> > http://groups.yahoo.com/group/amibroker/files/groupfaq.html
> >
> > Yahoo! Groups Links
> >
> > To visit your group on the web, go to:
> > http://groups.yahoo.com/group/amibroker/
> >
> > To unsubscribe from this group, send an email to:
> > amibroker-unsubscribe@xxxxxxxxxxxxxxx
> >
> > Your use of Yahoo! Groups is subject to:
> > http://docs.yahoo.com/info/terms/
> >
> >
> >
Send BUG REPORTS to bugs@xxxxxxxxxxxxx
Send SUGGESTIONS to suggest@xxxxxxxxxxxxx
-----------------------------------------
Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx
(Web page: http://groups.yahoo.com/group/amiquote/messages/)
--------------------------------------------
Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html
------------------------ Yahoo! Groups Sponsor ---------------------~-->
Buy Ink Cartridges or Refill Kits for your HP, Epson, Canon or Lexmark
Printer at MyInks.com. Free s/h on orders $50 or more to the US & Canada.
http://www.c1tracking.com/l.asp?cid=5511
http://us.click.yahoo.com/mOAaAA/3exGAA/qnsNAA/GHeqlB/TM
---------------------------------------------------------------------~->
Yahoo! Groups Links
To visit your group on the web, go to:
http://groups.yahoo.com/group/amibroker/
To unsubscribe from this group, send an email to:
amibroker-unsubscribe@xxxxxxxxxxxxxxx
Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
|