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

[amibroker] Re: Portfolio trading



PureBytes Links

Trading Reference Links

I tried to stay close to the example code in the documentation. And 
leaving everything else at default. As a further explaination of the 
issues I am having, here is the relevant portion of the code. Are 
there any suggestions as to what I might be missing????

Buy = CondBuy1;
Sell = CondSell1;
//EnableRotationalTrading();
SetOption("InitialEquity",20000);
posqty = 2;
SetOption("MaxOpenPositions",posqty);
PositionSize = -100/posqty;
//SetOption("WorstRankHeld",20);
PositionScore =  ROC(Close,15);

Min shares = 0.1

The summary report sometimes shows buying 2 positions, but sometimes 
only 1. For example on 3/18/02, where it buys only VLE-I. This stays 
true even when I make the Initial Equity 200,000.

Ticker	Trade	Date	Price	Ex. date	Ex. Price	% chg
	Profit	% Profit	Shares	Position value	Cum. Profit
	# bars	Profit/bar	MAE	MFE	Scale In/Out	
DFSCX	Long (127)	1/29/2001	7.77708	3/15/2001
	7.01799	-9.76%	-976.06	-9.76%	1285.83	10000.00	-
976.06	33	-29.58	-9.76%	1.10%	0/0
OTC-C	Long (127)	1/29/2001	2838.34	3/15/2001
	1940.71	-31.63%	-3162.52	-31.63%	3.52319	10000.00
	-4138.58	33	-95.83	-32.24%	0.00%	0/0
OTC-C	Long (127)	5/3/2001	2146.2	7/12/2001
	2075.74	-3.28%	-260.37	-3.28%	3.69523	7930.71	-4398.94
	49	-5.31	-8.55%	7.81%	0/0
JAVLX	Long (127)	5/3/2001	46.3361	7/12/2001
	41.1193	-11.26%	-892.89	-11.26%	171.156	7930.71	-5291.84
	49	-18.22	-13.07%	5.52%	0/0
OTC-C	Long (127)	10/24/2001	1731.54	2/7/2002
	1782.11	2.92%	214.78	2.92%	4.24713	7354.08	-5077.06
	73	2.94	-3.70%	18.93%	0/0
VLE-I	Long (127)	10/24/2001	1086.89	2/7/2002
	1171.11	7.75%	569.85	7.75%	6.76617	7354.08	-4507.21
	73	7.81	-1.77%	17.66%	0/0
***************Here is 3/18/02******************
VLE-I	Long (127)	3/18/2002	1307.89	5/20/2002
	1285.71	-1.70%	-131.37	-1.70%	5.92282	7746.39	-4638.58
	45	-2.92	-4.44%	1.77%	0/0
**************************************************
OTC-C	Long (127)	9/17/2002	1259.94	9/18/2002
	1252.13	-0.62%	-47.61	-0.62%	6.09609	7680.71	-4686.19
	2	-23.81	-0.62%	0.00%	0/0
OTC-C	Long (127)	10/22/2002	1292.8	1/28/2003
	1342.18	3.82%	292.46	3.82%	5.92273	7656.90	-4393.73
	67	4.37	0.00%	15.09%	0/0
FDGFX	Long (127)	4/7/2003	21.1921	8/11/2003
	23.6167	11.44%	892.79	11.44%	368.21	7803.14	-3500.93
	88	10.15	-1.58%	16.40%	0/0
TWCUX	Long (127)	4/7/2003	21.695	8/11/2003
	23.9724	10.50%	819.11	10.50%	359.674	7803.14	-2681.82
	88	9.31	-1.47%	14.04%	0/0


The detailed report shows enough cash on 3/18/02 ($7746.39) to buy 
the second ranked fund OTC-C where the price on 3/18/02 is 1877.


3/15/2002
	Entry signals(score):
	Exit signals:
	0 Open Positions: , Equity: 15492.8, Cash: 15492.8
3/18/2002
	Entry signals(score):VLE-I=Buy(9.32135), OTC-C=Buy(8.33614), 
3GRW=Buy(7.47207), RISIX=Buy(7.38853), 
	Exit signals:
	Enter Long, VLE-I, Price: 1307.89, Shares: 5.92282, 
Commission: 0, Rank: 9.32135, Equity 15492.8, Margin Loan: 0, Fx 
rate: 1
	1 Open Positions: , VLE-I (+5.92282), Equity: 15492.8, Cash: 
7746.39
3/19/2002
	Entry signals(score):
	Exit signals:
	1 Open Positions: , VLE-I (+5.92282), Equity: 15526.1, Cash: 

I am stumped on this one. 

Thanks in advance for taking the time to review this and comment.

Bill


--- In amibroker@xxxxxxxxxxxxxxx, "emp62" <emp62@xxxx> wrote:
>
> assuming you have your settings right like Terry explains in some 
cases it 
> will not take all positions you expect it will. For instance if 
the amount 
> of $$ you allocate to 1 stock is less than (min. Shares setting) x 
(Share 
> Price). In this case it will not take a position in that stock and 
it will 
> skip all other positions it had to take on that day if they are 
lower in 
> rank to this position. So if GOOG is on the top of the rank and 
you expect 
> your system to enter 10 stocks then you might have a problem if 
Min. Shares 
> is set to e.g. 200,
> 
> Ed
> 
> 
> 
> ----- Original Message ----- 
> From: "billbarack" <wbarack@xxxx>
> To: <amibroker@xxxxxxxxxxxxxxx>
> Sent: Tuesday, January 31, 2006 10:58 PM
> Subject: [amibroker] Portfolio trading
> 
> 
> >I am looking at the details of a simple portfolio trading system 
that
> > has posqty = 2. At times, when a buy is signaled, it only buys 
one
> > fund and leaves the second position is cash. My Positions score 
os ROC
> > (Close,15).
> >
> > Any thoughts as to what may be happening? Why doesn't it buy the
> > second position?
> >
> > Bill
> >
> >
> >
> >
> >
> >
> > 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
> >
> >
> >
> >
> >
> >
>






------------------------ Yahoo! Groups Sponsor --------------------~--> 
Try Online Currency Trading with GFT. Free 50K Demo. Trade 
24 Hours. Commission-Free. 
http://us.click.yahoo.com/RvFikB/9M2KAA/U1CZAA/GHeqlB/TM
--------------------------------------------------------------------~-> 

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

<*> 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/