[amibroker] Re: MarginLoan control

2008-08-05 Thread guhu0434
Thank you very much, you give me the missing informations. I just wondered in the past why AB used margin even if I had enough cash. That's clear now ... WIth regards, Guido --- In amibroker@yahoogroups.com, "Mike" <[EMAIL PROTECTED]> wrote: > > Tip, > > Sorry, I used AmiBroker terms in the c

[amibroker] Re: MarginLoan control

2008-08-05 Thread guhu0434
Thank you very much, you give me the missing informations. I just wondered in the past why AB used margin even if I had enough cash. That's clear now ... WIth regards, Guido --- In amibroker@yahoogroups.com, "Mike" <[EMAIL PROTECTED]> wrote: > > Tip, > > Sorry, I used AmiBroker terms in the c

[amibroker] Re: MarginLoan control

2008-08-04 Thread Mike
Tip, Sorry, I used AmiBroker terms in the context of a broker in my last reply, which may have confused things. I'll try again keeping the terms straight. Your broker may have different names for it. But, when trading on margin we have; cash, stock, equity, maintenance margin, available funds

[amibroker] Re: MarginLoan control

2008-08-04 Thread tipequity
Mike I had done what you suggested a while back. I sort of hijacked this thread to warn portfolio stock traders that the results that they may get in their backtest is NOT correct if they use margin. I am certain that in the US, brokers will not charge you margin expense if you have cash in yo

[amibroker] Re: MarginLoan control

2008-08-04 Thread Mike
Admittedly, it has been a while since I last looked at this. But, my recollection is that AmiBroker will use the ratio accross all trades, regardless of whether or not you have actually expended all your cash. In other words, in the example given, the distribution would in fact be $5000 from ca

[amibroker] Re: MarginLoan control

2008-08-04 Thread tipequity
Mike Wouldn't this approach create a incorrect results if: 1. you are a EOD stock trader 2. want to use 50% margin 3. no more than 10% in one stock 4. initial cash $100,000 on the first buy you should be using $10,000 from cash not from $5000 and $5000 on margin. It seems t

[amibroker] Re: MarginLoan control

2008-08-04 Thread Mike
Hi, The feature dictates what percentage of the purchase price is to be paid from your own funds vs. a margin loan. When set to 100, you pay the entire amount (i.e. 100%). When set to 75, you pay 75% of the purchase and take a margin loan for the remaining 25%. When set to 50, you pay half and

[amibroker] Re: MarginLoan control

2008-08-04 Thread guhu0434
Hello, thank you for the answer. The setting you mention gives the backtester the possibility to make a margin loan. I am interested in the actual amount of the loan. I hope I explained it in such a manner you get my point. I got the stuff with cash and equity simply by looking at the equity

[amibroker] Re: MarginLoan control

2008-08-03 Thread Mike
Hi, The easiest approach is to set the margin from the AA Settings window (e.g. 100 means no margin, 50 means max overnight margin allowed by U.S. markets, 50% paid by you, 50% by your broker). If you want to do it using code, try SetOption("AccountMargin", 50), for example. Mike P.S. Where