[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [amibroker] Re: AmiBroker Support - One More Time Tomasz



PureBytes Links

Trading Reference Links

Tomasz,
 
Thanks to you and others for sharing and providing feedback regarding certain statistics that are provided with AmiBroker via Margin that I feel are incorrect.  I am reminded by a friend that I could have made the example even simplier and will do so one last time.
 
SIMPLIER EXAMPLE:  Lets say you have a trading system that holds ^rut for the entire year.  You tell AmiBroker to start with $100 with no margin and lets say the system makes $20.  So, CAR is 20%.  Now, there is only 1 trade so the % wins is 100% and the % profit is 20% as expected.  Lets also say that someone else trades your system but with margin at 50%.  He also starts with $100, but makes $40 due to margin.  What is CAR?  As expected, it is 40% or twice what I made of 20%.  Likewise, he's % wins is 100% as there is only one trade with the system.   Now the final question.  What is the % profit for the system when he uses margin of 50%?  Is it 20% as Tomasz implies?  That is, did my friend really have a CAR of 40% and % profit of 20% as compared to the systems I used with no margin with CAR of 20% and % profit of 20%.  Or, is the % profit for my friend's application of the system 40%?  My answer:  The first system with no margin has stats of: 20% CAR, 100% wins, 20% Profit.  The system with margin at 50% has stats of: 40% CAR, 100% wins, 40% Profit. 
 
One more thing.  It was suggested that one could simply multiply the expectancy times 2 if one truely believes that the numbers provided by AmiBroker are 1/2 the values they should be with 50% margin.  I am reminded that one can certainly do this (due to the distributed law), but ONLY if the margin level is held constant over all trades.  That is, if margin changes in your system (i.e., one uses more margin when a MACD is on a buy then without it), then one can not simply take the numbers provided by AmiBroker and double them.  And, yes, I know that others (not me as I am not there yet) can most certainly use Custom Backtest to enhance or otherwise change the stats to their liking.
 
Well, that is about it.  I have shared what I believe to be correct.  Tomasz has done the same.  I will most certainly wait for his reply and will, of course, appreciate it.  (So, to me clear, this classifies as a Question, impling that I would appreciate a reply.)  After that, I will let it go.  This will probably not stop me from cornering Tomasz in Houston in the Spring.
 
Regards ... 

Tomasz Janeczko <amibroker@xxxxxx> wrote:
You don't understand. It will show % gain/loss of PORTFOLIO exactly IN LINE
with their "account balances"
and this is what the report shows in CAR/RAR and all other portfolio-level measures.

Single TRADE % profit/loss is something different. The way AmIBroker handles
it has distinct advantage when it comes to setting stops as stops directly
represent price movement and have 1-1 correspondence to profit if calculated
the way it is now in AmiBroker regardless of margin used.

Best regards,
Tomasz Janeczko
amibroker.com
----- Original Message -----
From: "Fred" <ftonetti@xxxxxxxxxxxxx>
To: <amibroker@xxxxxxxxxxxxxxx>
Sent: Wednesday, August 31, 2005 6:11 PM
Subject: [amibroker] Re: AmiBroker Support


> Oh I know ... That suggests that there is no difference in %
> Gain/Loss regardless of whether or not margin is used.  Most peoples
> account balances would tell them something quite different.
>
> --- In amibroker@xxxxxxxxxxxxxxx, "Tomasz Janeczko" <amibroker@xxxx>
> wrote:
>> Yes, you are right and this is exactly the difference between
> _portfolio_ profit and
>> _trade_ profit in AmiBroker.
>>
>> _Portfolio_ % profit uses EQUITY (so it is subject to leverage) as
> base of calculations.
>> _Trade_ % profit uses entry value (#shares * price) as base of
> calculations.
>>
>> Best regards,
>> Tomasz Janeczko
>> amibroker.com
>> ----- Original Message -----
>> From: "Fred" <ftonetti@xxxx>
>> To: <amibroker@xxxxxxxxxxxxxxx>
>> Sent: Wednesday, August 31, 2005 5:52 PM
>> Subject: [amibroker] Re: AmiBroker Support
>>
>>
>> > The definition of Equity is correct but the example was badly
>> > worded ...
>> >
>> > What I should have said was ... There is no additional EQUITY by
>> > utilizing additional buying power but investing the same dollar
>> > amount because although assets increase, liabilities do as well
> i.e.
>> > whether leverage is 1x or 100x, EQUITY is the same until market
>> > value changes.  When market value changes EQUITY will be
> impacted
>> > 100x as much with leverage of 100x whether that be up or down. 
>> >
>> > --- In amibroker@xxxxxxxxxxxxxxx, "Fred" <ftonetti@xxxx> wrote:
>> >> I'd agree that buying power is twice, but NOT equity.  Equity
> is
>> >> defined as the difference between the market value of a
> property
>> > and
>> >> the claims held against it.  If this were not true then I could
>> > have
>> >> enjoyed having 10x the equity at the time of my last home
> purchase
>> > by
>> >> buying a home for 10x as much and taking out a mortgage that
> was
>> > 10x
>> >> as much.
>> >>
>> >> --- In amibroker@xxxxxxxxxxxxxxx, "Tomasz Janeczko"
>> > <amibroker@xxxx>
>> >> wrote:
>> >> > [amibroker] Re: Script and Stockconsultant websiteHello,
>> >> >
>> >> > Just a few posts ago I think I expressed clearly what is
> needed
>> >> when contacting support:
>> >> > http://finance.groups.yahoo.com/group/amibroker/message/86456
>> >> >
>> >> > Sending screenshot alone means nothing to me.
>> >> >
>> >> > Since you do NOT provide all necessary details (formula,
>> > settings)
>> >> that are needed to analyse
>> >> > the case you are giving me NO CHANCE to know what you have
> done
>> > to
>> >> obtain results.
>> >> >
>> >> > _ASSUMING_ that this is the same case as Bert reported
> earlier
>> >> (comparing results obtained
>> >> > with ^RUT with 50% margin with results obtained with UAPIX
>> > without
>> >> margin,
>> >> > I can say that numbers ARE correct.
>> >> >
>> >> >  I can copy-paste response which I sent to him with exact
>> >> calculations explaining why:
>> >> >
>> >> > === MY RESPONSE TO BERT COPY PASTE SECTION 1 ===
>> >> > In this example
>> >> > we assume the following: that UAPIX movements are exactly 2x
> the
>> >> movement of ^RUT
>> >> > (so there is exact 2x leverage between them). (Note that 
> this
>> >> assumption may not be true in
>> >> > reality and is used for illustration purposes only)
>> >> >
>> >> > say UAPIX moves from 23.77 to 24.77 (+4.2%) and your initial
>> > equity
>> >> is
>> >> > 23770 so you purchase 1000 shares. Your profit is $1000 and
>> > percent
>> >> profit is +4.2%
>> >> >
>> >> > At the same time ^RUT moves 2.1% from 638.67 to 652.10.
>> >> > Now your cash amount is the same as in previous case 23770
> but
>> > you
>> >> are on
>> >> > 50% margin so your buying power is twice as much 2*23770 =
> 47540.
>> >> > So you can purchase 74.4359 shares (for simplicity
>> >> > in the example we assume that fractional purchases are
> possible)
>> >> > Your dollar profit is (652.10-638.67) * 74.4359 = $1000
> (approx
>> > due
>> >> to rounding) - the same
>> >> > as in first case.
>> >> >
>> >> > Your PERCENT profit is however:
>> >> > $1000 / $47540 = 2.1%
>> >> >
>> >> > This is so because in second case you had to buy shares for
>> > $47540
>> >> > while in first case you only spent $23770.
>> >> >
>> >> >
>> >> > If you want expectancy to be the same in both cases you
> should
>> > not
>> >> use
>> >> > percent profits but dollar profits instead.
>> >> >
>> >> >
>> >> > === MY RESPONSE TO BERT COPY PASTE SECTION 2 ===
>> >> >
>> >> >
>> >> > When you use leveraged instrument BOTH % profit and dollar
>> > profit
>> >> are twice
>> >> > because PERCENT is based on SMALLER EQUITY VALUE.
>> >> >
>> >> > ( 2 * DOLLAR GAIN ) / EQUITY = TWICE normal % profit
>> >> >
>> >> > If you use magin account PERCENT PROFIT is calculated from
>> > HIGHER
>> >> EQUITY VALUE.
>> >> > When use 50% margin account your EQUITY is TWICE your cash.
>> >> > So even if DOLLAR GAIN is twice, PERCENT GAIN is the SAME
>> > because
>> >> equity (buying power)
>> >> > is TWICE.
>> >> >
>> >> > ( 2 * DOLLAR GAIN ) / ( 2 * EQUITY ) = DOLLAR GAIN / EQUITY =
>> >> normal % profit
>> >> >
>> >> > This is so because on margin account you actually purchase
> TWICE
>> >> the original amount
>> >> > and your dollar profit is also twice as much. But those 2/2
>> > reduce
>> >> and % profit remains the same.
>> >> >
>> >> > If you are using leveraged instrument, things are quite
>> > different:
>> >> > you invest only HALF the amount you would invest on margin
>> > account,
>> >> yet dollar profits are the same.
>> >> > Hence percent profit is double.
>> >> >
>> >> > =====
>> >> >
>> >> > Best regards,
>> >> > Tomasz Janeczko
>> >> > amibroker.com
>> >> >   ----- Original Message -----
>> >> >   From: Fred Tonetti
>> >> >   To: amibroker@xxxxxxxxxxxxxxx
>> >> >   Sent: Wednesday, August 31, 2005 1:58 AM
>> >> >   Subject: [amibroker] Re: AmiBroker Support
>> >> >
>> >> >
>> >> >   Looks like the attachment didn't make it in the previous
> post .
>> >> >
>> >> >   
>> >> >
>> >> >   = = = = = = = = = = = =
>> >> >
>> >> >   
>> >> >
>> >> >   TJ,
>> >> >
>> >> >   
>> >> >
>> >> >   Really ?  Maybe we don't understand the statistics . See
> the
>> >> attachment.  Same system on both sides traded without margin on
>> > the
>> >> left, with margin on the right.
>> >> >
>> >> >   
>> >> >
>> >> >   Should:
>> >> >
>> >> >   
>> >> >
>> >> >   -          Avg Profit/Loss% in ALL TRADES Section
>> >> >
>> >> >   -          Avg Profit % in WINNERS Section
>> >> >
>> >> >   -          Max Trade% Drawdown
>> >> >
>> >> >   
>> >> >
>> >> >   be the same ?
>> >> >
>> >> >   
>> >> >
>> >> >   If so can you please explain ?
>> >> >
>> >> >   
>> >> >
>> >> >   Thanks, Fred
>> >> >
>> >> >   
>> >> >
>> >> >   = = = = = = = = = = =
>> >> >
>> >> >   
>> >> >
>> >> >   Follow up: I have made a check to verify your report about
>> > avg.
>> >> profit/loss
>> >> >   and all I can say is that I can not confirm your
> observations.
>> >> >
>> >> >   Best regards,
>> >> >   Tomasz Janeczko
>> >> >   amibroker.com
>> >> >
>> >> >
>> >> >   ----- Original Message -----
>> >> >   From: "Tomasz Janeczko" <amibroker@>
>> >> >   To: <amibroker@xxxxxxxxxxxxxxx>
>> >> >   Sent: Tuesday, August 30, 2005 5:51 PM
>> >> >   Subject: Re: [amibroker] Is AmiBroker Support on
>> > Vacation, "rude"
>> >> or what??
>> >> >
>> >> >
>> >> >   > Hello,
>> >> >   >
>> >> >   > I have forwarded your message to Marcin for checking in
>> > detail.
>> >> >   > One thing is sure that we do not "selectively decide"
> what
>> >> issues to respond
>> >> >   to.
>> >> >   >
>> >> >   > I have quickly checked the issue you mentioned and you
> don't
>> >> ask any question
>> >> >   in it.
>> >> >   >
>> >> >   > All I can see are some thoghts/observations.
>> >> >   >
>> >> >   > Best regards,
>> >> >   > Tomasz Janeczko
>> >> >   > amibroker.com
>> >> >   > ----- Original Message -----
>> >> >   > From: "bistrader" <bistrader@>
>> >> >   > To: <amibroker@xxxxxxxxxxxxxxx>
>> >> >   > Sent: Tuesday, August 30, 2005 4:35 PM
>> >> >   > Subject: [amibroker] Is AmiBroker Support on
>> > Vacation, "rude"
>> >> or what??
>> >> >   >
>> >> >   >
>> >> >   >>I find it disturbing that AmiBroker Support selectively
>> > decides
>> >> what
>> >> >   >> issues it wants to respond to. I have talked to several
> in
>> > our
>> >> >   >> FastTrack group that send emails to AmiBroker Support
> and
>> > even
>> >> Tomasz
>> >> >   >> asking for help. Oh sure, they get the standard message
>> > saying
>> >> that
>> >> >   >> a response will be provided within 24 hours but they
> never
>> >> hear a
>> >> >   >> thing on what they consider to be critical items. One
> might
>> >> ask, why
>> >> >   >> is AmiBroker Support and even Tomasz being so selective
> in
>> >> what they
>> >> >   >> repond to? I, for one, have no idea.
>> >> >   >>
>> >> >   >> I certainly hope that this does not continue. I really
> like
>> > the
>> >> >   >> software and the response by AmiBroker prior to these
>> > string
>> >> of cases
>> >> >   >> has been quite good.
>> >> >   >>
>> >> >   >> In any case, I hope it changes. I saw a message recently
>> > where
>> >> >   >> someone on this board implied that someone else was
> being
>> >> rude. Is
>> >> >   >> it "rude" when one tells you that a response will be
>> > provided
>> >> and
>> >> >   >> none ever is? Is it "rude" when someone does not respond
>> > even
>> >> when
>> >> >   >> repeated requests are made. I hope not. I would rather
>> > think
>> >> that
>> >> >   >> he/she just got caught up in the moment. An oversight,
> if
>> > you
>> >> will.
>> >> >   >>
>> >> >   >> So, if interested, think about responding to request
> 22642
>> >> originally
>> >> >   >> sent to AmiBroker on September 12th and then again on
>> > September
>> >> >   >> 18th. Try to be nice as we should all practice what we
>> > preach.
>> >> >
>> >> >         
>> >> >        
>> >> >       
>> >> >         
>> >> >       
>> >> >   
>> >> >
>> >> >   
>> >> >
>> >> >
>> >> > --------------------------------------------------------------
> ---
>> > ---
>> >> ----------
>> >> >
>> >> >   I am using the free version of SPAMfighter for private
> users.
>> >> >   It has removed 6178 spam emails to date.
>> >> >   Paying users do not have this message in their emails.
>> >> >   Try SPAMfighter for free now!
>> >> >
>> >> >
>> >> >
>> >> > --------------------------------------------------------------
> ---
>> > ---
>> >> ----------
>> >> >   I am using the free version of SPAMfighter for private
> users.
>> >> >   It has removed 6178 spam emails to date.
>> >> >   Paying users do not have this message in their emails.
>> >> >   Try SPAMfighter for free now!
>> >> >
>> >> >
>> >> >   Please note that this group is for discussion between users
>> > only.
>> >> >
>> >> >   To get support from AmiBroker please send an e-mail
> directly
>> > to
>> >> >   SUPPORT {at} amibroker.com
>> >> >
>> >> >   For other support material please check also:
>> >> >   http://www.amibroker.com/support.html
>> >> >
>> >> >
>> >> >
>> >> >
>> >> >
>> >> >   SPONSORED LINKS Investment management software  Real estate
>> >> investment software  Investment property software 
>> >> >         Software support  Real estate investment analysis
>> > software 
>> >> Investment software 
>> >> >
>> >> >
>> >> > --------------------------------------------------------------
> ---
>> > ---
>> >> ----------
>> >> >   YAHOO! GROUPS LINKS
>> >> >
>> >> >     a..  Visit your group "amibroker" on the web.
>> >> >      
>> >> >     b..  To unsubscribe from this group, send an email to:
>> >> >      amibroker-unsubscribe@xxxxxxxxxxxxxxx
>> >> >      
>> >> >     c..  Your use of Yahoo! Groups is subject to the Yahoo!
>> > Terms
>> >> of Service.
>> >> >
>> >> >
>> >> > --------------------------------------------------------------
> ---
>> > ---
>> >> ----------
>> >
>> >
>> >
>> >
>> >
>> > Please note that this group is for discussion between users only.
>> >
>> > To get support from AmiBroker please send an e-mail directly to
>> > SUPPORT {at} amibroker.com
>> >
>> > For other support material please check also:
>> > http://www.amibroker.com/support.html
>> >
>> >
>> > Yahoo! Groups Links
>> >
>> >
>> >
>> >
>> >
>> >
>> >
>
>
>
>
>
>
> Please note that this group is for discussion between users only.
>
> To get support from AmiBroker please send an e-mail directly to
> SUPPORT {at} amibroker.com
>
> For other support material please check also:
> http://www.amibroker.com/support.html
>
>
> Yahoo! Groups Links
>
>
>
>
>
>
>


SPONSORED LINKS
Investment management software Real estate investment software Investment property software
Software support Real estate investment analysis software Investment software

__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com

Please note that this group is for discussion between users only.

To get support from AmiBroker please send an e-mail directly to
SUPPORT {at} amibroker.com

For other support material please check also:
http://www.amibroker.com/support.html





SPONSORED LINKS
Investment management software Real estate investment software Investment property software
Software support Real estate investment analysis software Investment software


YAHOO! GROUPS LINKS