Hi List!

I am interested in plotting my portfolio's performance and don't exactly
know how to do it.  I have built a (not-so-great) model - the data below is
found below.  I used information on each individual S&P 500 stock over the
past ~10 years (RSI, moving averages, price changes, and price).  Selling
the stock occurs when a stop loss or take profit is signaled.  The model was
built without using the blotter or quantstrat packages - it was built with a
which function.  The code is quite long. However, if you think it will be
helpful, I can always attach it.  I would like inital equity to be $100000,
and I would like to invest $25000 per buy signal.  I hope this is clear
enough.  If not, please let me know!

Thanks!
Anna


       BuyDate         Equity BuyPrice Action   SellDate SellPrice
PerformancePerc.
51  2001-07-02  FCX.UN.Equity   5.3600   LONG 2001-07-11    5.9450
  0.10914179
122 2001-07-02  TIE.UN.Equity   2.2875   LONG 2001-07-17    2.6050
  0.13879781
82  2001-07-13    L.UN.Equity  19.2867   LONG 2001-07-20   18.2667
 -0.05288619
100 2001-09-06 PCLN.UW.Equity  29.7000   LONG 2001-09-17   18.0600
 -0.39191919
98  2001-09-17 ORLY.UW.Equity  12.0000   LONG 2001-09-19   13.2450
  0.10375000
73  2001-09-18  JCP.UN.Equity  20.5800   LONG 2001-09-21   18.8600
 -0.08357629
32  2001-09-19  BBY.UN.Equity  21.9378   LONG 2001-09-20   20.2044
 -0.07901430
57  2002-04-05 FFIV.UW.Equity   8.4200   LONG 2002-04-10    7.8945
 -0.06241093
133 2002-05-06  WDC.UN.Equity   5.1000   LONG 2002-05-07    4.1800
 -0.18039216
134 2002-06-25  WFR.UN.Equity   4.7500   LONG 2002-07-03    4.2400
 -0.10736842
93  2002-06-27   OI.UN.Equity  14.0500   LONG 2002-07-02   12.8500
 -0.08540925
29  2002-07-01 AMZN.UW.Equity  13.5500   LONG 2002-07-05   15.2100
  0.12250923
95  2002-07-01   OI.UN.Equity  13.6000   LONG 2002-07-02   12.8500
 -0.05514706
35  2002-07-19  CLF.UN.Equity   2.7875   LONG 2002-07-22    3.1550
  0.13183857
33  2002-07-23  BIG.UN.Equity  14.4100   LONG 2002-07-25   16.0600
  0.11450382
48  2002-10-07 CTSH.UW.Equity   4.0000   LONG 2002-10-09    4.4125
  0.10312500
115 2003-07-21  STJ.UN.Equity  24.4450   LONG 2003-07-29   27.1550
  0.11086112
106 2003-08-06  PWR.UN.Equity   4.6600   LONG 2003-08-11    5.1900
  0.11373391
87  2003-08-08 NVDA.UW.Equity   5.1633   LONG 2003-08-19    5.9500
  0.15236380
21  2003-10-01 ALTR.UW.Equity  17.9000   LONG 2003-10-28   19.8900
  0.11117318
71  2003-11-05  IVZ.UN.Equity  13.9800   LONG 2003-12-08   13.0600
 -0.06580830
105 2003-11-05 PCLN.UW.Equity  21.6400   LONG 2003-11-11   19.6500
 -0.09195933
113 2003-12-16 SNDK.UW.Equity  27.6250   LONG 2003-12-19   30.4450
  0.10208145
132 2004-04-14  VTR.UN.Equity  21.9000   LONG 2004-07-06   24.5000
  0.11872146
67  2004-04-29  FRX.UN.Equity  63.9900   LONG 2004-05-21   59.2000
 -0.07485545
138 2004-04-29    X.UN.Equity  29.4500   LONG 2004-05-03   27.8400
 -0.05466893
36  2004-04-30  CLF.UN.Equity   5.9225   LONG 2004-05-06    5.4825
 -0.07429295
37  2004-05-03  CLF.UN.Equity   5.7838   LONG 2004-05-06    5.4825
 -0.05209378
7   2004-05-06  AKS.UN.Equity   4.4100   LONG 2004-05-07    4.1600
 -0.05668934
68  2004-05-10  FRX.UN.Equity  62.9600   LONG 2004-05-21   59.2000
 -0.05972046
120 2004-06-16 SYMC.UW.Equity  20.3850   LONG 2004-07-27   22.4550
  0.10154525
31  2004-10-19  ATI.UN.Equity  14.6100   LONG 2004-10-20   16.2800
  0.11430527
23  2005-01-13  AMD.UN.Equity  15.1600   LONG 2005-02-04   17.4900
  0.15369393
14  2005-03-28  AKS.UN.Equity  11.2900   LONG 2005-03-29   10.6800
 -0.05403012
1   2005-04-11  ADM.UN.Equity  21.3200   LONG 2005-04-18   20.2300
 -0.05112570
140 2005-04-13    X.UN.Equity  46.5000   LONG 2005-04-15   42.9100
 -0.07720430
61  2005-04-15 FFIV.UW.Equity  22.0850   LONG 2005-04-28   20.8750
 -0.05478832
137 2005-04-15  WFR.UN.Equity  11.2300   LONG 2005-04-21   12.4500
  0.10863758
3   2005-05-12  AES.UN.Equity  14.3900   LONG 2005-06-17   15.8400
  0.10076442
84  2005-10-27  LSI.UN.Equity   7.7000   LONG 2005-12-01    8.8900
  0.15454545
45  2005-11-10  CNX.UN.Equity  27.0600   LONG 2005-11-17   29.9000
  0.10495196
49  2006-04-27 ESRX.UW.Equity  19.1225   LONG 2006-05-09   18.1050
 -0.05320957
75  2006-05-12 JDSU.UW.Equity  23.3600   LONG 2006-05-15   22.0800
 -0.05479452
34  2006-05-15 BRCM.UW.Equity  36.3500   LONG 2006-05-22   34.3400
 -0.05529574
89  2006-05-30 NVDA.UW.Equity  15.3133   LONG 2006-06-07   14.5467
 -0.05006106
91  2006-06-06 NVDA.UW.Equity  14.8133   LONG 2006-06-12   13.4467
 -0.09225493
66  2006-06-13  FLS.UN.Equity  48.7900   LONG 2006-06-29   53.8000
  0.10268498
5   2007-03-02 AKAM.UW.Equity  47.7800   LONG 2007-03-12   52.5800
  0.10046044
128 2007-07-26  TSO.UN.Equity  49.4300   LONG 2007-08-03   45.4200
 -0.08112482
143 2007-07-27    X.UN.Equity  97.7300   LONG 2007-08-03   91.5300
 -0.06344009
44  2007-08-01  CLF.UN.Equity  33.6150   LONG 2007-08-09   31.5600
 -0.06113342
108 2007-08-03  PWR.UN.Equity  26.3500   LONG 2007-08-14   25.0100
 -0.05085389
17  2008-07-03  AKS.UN.Equity  52.7900   LONG 2008-07-17   48.2400
 -0.08619057
46  2008-07-23  COG.UN.Equity  46.9400   LONG 2008-07-29   44.1200
 -0.06007669
119 2008-07-24  SWN.UN.Equity  32.9800   LONG 2008-07-31   36.3100
  0.10097029
111 2009-08-10    S.UN.Equity   3.7100   LONG 2009-09-02    3.5200
 -0.05121294
116 2009-10-26  STT.UN.Equity  44.5000   LONG 2009-10-30   41.9800
 -0.05662921
144 2009-10-27    X.UN.Equity  37.4100   LONG 2009-10-28   35.5300
 -0.05025394
81  2009-10-28 JDSU.UW.Equity   5.8100   LONG 2009-11-06    6.4600
  0.11187608
56  2010-01-27  FCX.UN.Equity  35.6250   LONG 2010-01-29   33.3450
 -0.06400000
70  2010-01-29   IP.UN.Equity  22.9100   LONG 2010-03-05   25.3500
  0.10650371
69  2010-04-29  HAR.UN.Equity  39.9800   LONG 2010-05-14   37.6200
 -0.05902951
85  2010-07-02  LXK.UN.Equity  32.4500   LONG 2010-07-27   37.7600
  0.16363636
63  2011-01-24 FFIV.UW.Equity 106.5600   LONG 2011-02-03  118.2100
  0.10932808
86  2011-02-23 NTAP.UW.Equity  50.6400   LONG 2011-03-11   47.5200
 -0.06161137
50  2011-02-24    F.UN.Equity  14.7000   LONG 2011-06-06   13.9100
 -0.05374150
4   2011-03-01  AIG.UN.Equity  36.7000   LONG 2011-04-04   33.9400
 -0.07520436
130 2011-06-10  TSO.UN.Equity  21.0400   LONG 2011-07-05   23.1500
  0.10028517

        [[alternative HTML version deleted]]

_______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-sig-finance
-- Subscriber-posting only. If you want to post, subscribe first.
-- Also note that this is not the r-help list where general R questions should 
go.

Reply via email to