System Implementation Exercise

rpc

Active Member
hi all
signals on 15/12/06 for 18/12/06
DISCLAIMER
The BUY and SELL signals are posted as a part of the System Implementation Education Exercise Only.
These are not to be construed as recommendations. Anybody acting on these would be solely responsible
for his/her own acts
.

system : KAMA - Default settings

BUY
Ticker Close
PIONEEREMB 218
ULTRACEMCO 1019.70

SELL

NONE

Extract of Trade Log - Trade Log enclosed
Pls note in Trade Log the SP are taken as Closing Prices even if they are difft from SL.


with best wishes
rpc

PS : Are we meeting tomorrow.Since Sanjay is not there should we meet on Sunday instead ?
 

murthymsr

Well-Known Member
dear sanjay and other friends,

now that we will be meeting very soon, i feel we may discuss on the following issues in addition to others.

1) presently some people are selecting the stocks on seing the performance of the market in the first few minutes and buying the selected ones at the open price and some are selecting and buying at some prevailing price (not open) in the opening minutes. buying at open may be better as it would not call somebody to be 'at the market' during the opening session. further, such logic can be easily be incorporated into the back-testing at a later stage.

2) the number of stocks: the portfolio limit of 5 stocks may be increased to 10. there are about 5 to 10 buy/sell selections on a day and the interval between buy and sell signals for a stock is more than a few weeks (excepting in the recent fall, which is unlikely to repeat). so, after a 2 or 3 days of buying activity, he will not be having cash to buy anything, even if a buy signal is generated. increasing the limit to 10 will also spread and reduce the risk. To ensure that the portfolio is well spread across time and that more buy signals generated are considered in evaluating the system, a max number of stocks to be bought on a day may be restricted to ONE.

another way is to buy a stock each day using 10% of the available 'cASH' subject to a minimum trade value of Rs. 10,000/-. this will make buy process much longer.

3) the stop-loss. the procedure now being adopted for stop loss is to be reviewed. i feel, we are 'away' from reality in the present method. ajay is right in repeatedly questioning on this. but we have to device a method that is easily implementd uniformly across all systems by all members.

we may have the stop-loss mechanism to initiate a stop when a 5% loss on EOD basis or 10% loss on intraday basis or 1% loss of total investment (Rs. 10,000/). (we may apply all these conditions simultaneously.

4) we may if possible decide on a common 'signals and trade reporting format' for use by all members.

5) as i understand, the objective of this exercise is NOT to make profits. objective is to assess the ability of the system to generate profits on a comparative basis with other systems. for this reason, commonness of procedures is more important than even the correctness. as the test continues, we will be able to identify 3 best 'buy' logics and best 3 'sell' logics. we may combine those three logics into one trading system with a 'voting option' giving option to user to select 'ONE' or 'TWO' or 'THREE' votes to suit his style of trading and dependance on the system. based on the exercised option, the system may select stocks meeting the selected votes.

by this process, user will be able to choose the level of confidence. of course, this implementation, if agreed, is to be implemented at the 'end' of the exercise.

6) the TradeLog.XLS proposed may be modified as required to incorpoarte the changes as discussed during these meetings.

there are just some of my thoughts, others too may express their views on thiese issues and also post their own observations / suggestions.


regards.
murthymsr
 

murthymsr

Well-Known Member
Hi friends,

System : MABIUTS-K1 (AMA)

Signals generated :

************************************************
Based on Data upto EOD of : 2006-12-15

BUY : EDUCOMP JSWSTEEL TULIP

SELL: THERMAX


SELL (Portfolio) : ---

SELL on 5 % StopLoss trigger : ---

----------------------------------------
Present Portfolio :
+790 SHIV-VANI @ 253.00 on 2006-12-14
+1150 PARADYNE @ 87.20 ON 2006-12-15


-----------------------------------------
Trading done : (if any, will be filled in after market opening @ the open price)

Buy :

Sell :

*************************************************

DISCLAIMER

THESE ARE NOT ANY RECOMMENDATIONS TO BUY OR SELL. THESE ARE SIGNALS GENERATED
BY THE SYSTEM BEING TESTED UNDER SYSTEM IMPLEMENTATION EDUCATION EXCERCISE.
ANYBODY ACTING ON THESE WILL BE SOLELY RESPONSIBLE FOR THEIR ACTIONS.


Regards

murthymsr
 

asnavale

Well-Known Member
hi anant
thanks for devoting your time.
with best wishes
rpc
Hi rpc,

I have almost finished the test of your afl. I say 'almost' because I need some clarification from you:

1) You have created two variables 'start' and 'end', both are dates. You are setting the values of these two to the same date. But you have never used these in the afl. Why are you creating these two variables? What you intend to to with these?

2) Your aim is to get all the stock symbols (for which a 'BUY' signal is generated) copied into watchlist 14. Is it correct?

If you can explain these two points I will finish and post the revised afl. At present I am able to copy the 'BUY' stocks for any date selected into watch list 14 (in fact into any watchlist specified). But I did not understand the creation of 'start' and 'end' which are never used in the afl.

Regards

-Anant
 

asnavale

Well-Known Member
dear sanjay and other friends,

now that we will be meeting very soon, i feel we may discuss on the following issues in addition to others.

............................

regards.
murthymsr
____________________

Hello friends,

Murthy has raised some relevant issues which we should discuss.

1) presently some people are selecting the stocks on seing the performance of the market in the first few minutes and buying the selected ones at the open price and some are selecting and buying at some prevailing price (not open) in the opening minutes. buying at open may be better as it would not call somebody to be 'at the market' during the opening session. further, such logic can be easily be incorporated into the back-testing at a later stage.
It was agreed in the previous chat room session that for BUY/SELL the open prices or the prices within about 15 minutes after market opens can be used. We can make it now mandatory to use only the OPEN price. As murthy said it will be more suitable for backtesting and one need not watch the live prices.

2) the number of stocks: the portfolio limit of 5 stocks may be increased to 10. there are about 5 to 10 buy/sell selections on a day and the interval between buy and sell signals for a stock is more than a few weeks (excepting in the recent fall, which is unlikely to repeat). so, after a 2 or 3 days of buying activity, he will not be having cash to buy anything, even if a buy signal is generated. increasing the limit to 10 will also spread and reduce the risk. To ensure that the portfolio is well spread across time and that more buy signals generated are considered in evaluating the system, a max number of stocks to be bought on a day may be restricted to ONE.
I agree with Murthy on this. We should raise the maximum number of stocks to at least 10. The daily maximum could be two instead of one.

another way is to buy a stock each day using 10% of the available 'cASH' subject to a minimum trade value of Rs. 10,000/-. this will make buy process much longer.
The number of shares bought can be left to the individual but we can fix a maximum and minimum amount to be invested.

3) the stop-loss. the procedure now being adopted for stop loss is to be reviewed. i feel, we are 'away' from reality in the present method. ajay is right in repeatedly questioning on this. but we have to device a method that is easily implementd uniformly across all systems by all members.

we may have the stop-loss mechanism to initiate a stop when a 5% loss on EOD basis or 10% loss on intraday basis or 1% loss of total investment (Rs. 10,000/). (we may apply all these conditions simultaneously.
I think what ajay says is correct. The system itself gives a stop which indicates the reversal. I have got the Sell signals when the fall in price was around 3% with respect to buying price. The artificial 'stop loss' we have now is thus redundant. Therefore, the 'stop loss' aspect should be considered in depth and clearly define what is STOP LOSS.

4) we may if possible decide on a common 'signals and trade reporting format' for use by all members.
This is really a good suggestion. Also, it is better if we report all the BUY and SELL signals generated, not only those which are traded. This way we can compare how many systems generate same signal for the same stock on the same day. It also helps us identify those systems which give the earliest signal for a particular stock.

5) as i understand, the objective of this exercise is NOT to make profits. objective is to assess the ability of the system to generate profits on a comparative basis with other systems. for this reason, commonness of procedures is more important than even the correctness. as the test continues, we will be able to identify 3 best 'buy' logics and best 3 'sell' logics. we may combine those three logics into one trading system with a 'voting option' giving option to user to select 'ONE' or 'TWO' or 'THREE' votes to suit his style of trading and dependance on the system. based on the exercised option, the system may select stocks meeting the selected votes. by this process, user will be able to choose the level of confidence. of course, this implementation, if agreed, is to be implemented at the 'end' of the exercise.
Yes, we are not making profit but laearning to make profit. We are trying to identify the factors which help us in making profit or at least minimise losses. We can rate the systems after some more experimentation. In a later discussion we can decide the modalities of voting and rating the systems.


6) the TradeLog.XLS proposed may be modified as required to incorpoarte the changes as discussed during these meetings.
The tradelog requires some changes. One thing I observed is the balance cash calculation does not take the loss into consideration. It is just the difference of Total equity at start and amount invested.

These are some of my reactions, and hope others also will post their views.

Regards

-Anant
 

rpc

Active Member
1) You have created two variables 'start' and 'end', both are dates. You are setting the values of these two to the same date. But you have never used these in the afl. Why are you creating these two variables? What you intend to to with these?
I wanted to run the afl on say 6/12/06 to get all the BUY signals on that date.Store those in watchlist.
2) Your aim is to get all the stock symbols (for which a 'BUY' signal is generated) copied into watchlist 14. Is it correct?
yes all BUYs and SELLs for the day the afl is run and only opposite signal(If WL contains BUY then SELL for that stock and vice versa)for stocks in WL.
If you can explain these two points I will finish and post the revised afl. At present I am able to copy the 'BUY' stocks for any date selected into watch list 14 (in fact into any watchlist specified). But I did not understand the creation of 'start' and 'end' which are never used in the afl.
hope I am clear

with best wishes

rpc
 

asnavale

Well-Known Member
Minutes of chat session held on Saturday, 16-12-2006

Hello friends,

As scheduled, the chat session was held on Saturday, 16-12-2006 at 9:30pm. Only Murthy, rpc and I were present. Initially we started in the main chat room but other people also came into the same room and started discussing various other matters. So we opened a separate room and continued the discussions there. During this transit the transcript of the talks in the main room was lost and only the discussions in the other room could be recorded. I am therefore reproducing the discussions in the earlier period from memory. If any points are missing, rpc or Murthy may add them.

The discussions were mainly on the points listed by Murthy in his post. As most of the other members were not present it was decided to take decisions only on certain points which would not have any effect on the strategies being followed. Other issues which require approval of other members were just discussed and final decisions would be taken after all other members give their opinion, may be in next Saturday's session.

1) The first point was regarding the trading prices. Murthy had already suggested that only Open price be taken which I also had supported. With a little more deliberations with rpc we finally decided that opening price will be quoted in all the trades reported. The main advantages of this are (i) Comparison of different systems would be on equal terms (ii) Any back testing can be easily performed with EOD data and (iii) one need not watch live prices.

THEREFORE, HENCEFORTH ALL MEMBERS WILL REPORT TRADES WITH OPENING PRICES ONLY.

2) The next point was the number of stocks in portfolio. Murthy and I had already suggested the number to be increased to 10. With detailed discussions with rpc and considering the amount to be invested, finally we agreed to increase the maximum number to 15 stocks, subject to a minimum of 5 stocks. In addition the maximum stocks to be bought on any day should be restricted to 2 only. This allows us to trade upto 8 days.

This brought up another point, that of maximum amount to be invested in a single stock. Murthy had suggested a proportional allocation based on available cash balance. But rpc and I suggested this formula should be revised in such a way that the trader should have some flexibility also. So after discussing at length it was finally decided that a minimum of 50,000 has to be invested in any one stock but not more than 2,00,000.

THEREFORE, HENCEFORTH MEMBERS CAN INVEST IN UPTO 15 STOCKS BUT NOT LESS THAN 5. THE AMOUNT INVESTED IN ANY ONE STOCK HAS TO BE AT LEAST 50,000 BUT NOT MORE THAN 2,00,000. THE NUMBER OF STOCKS TAHT CAN BE PURCHASED ON ANY SINGLE DAY IS RESTRICTED TO 2. IT IS NOT NECESSARY TO BUY EVERY DAY. HOWEVER, THERE IS NO LIMIT ON SELLING. ALL SELL SIGNALS SHOULD BE STRICTLY EXECUTED.

3) This limitation on stocks bought on a day brought another point by rpc. If more BUY signals are generated then which two are to be taken? This again relates to the point Murthy has suggested. It is ranking of the signals. The various options discussed included use of indicators such as MACD, RSI etc as well as volume. The discussions were quite lengthy and it was felt that incorporating indicators would require change in code and this topic of making changes to the existing code has to be discussed separately. It was felt that suggesting an indicator requires thorough discussion by other knowledgeable members. Finally it was decided that only change in Volume should be considered. Here Murthy pointed out that volume change should not be a sudden spurt but a gradual increase (as Karthik advocates). For this purpose rpc suggested considering MA of Volume instead of raw volume. I suggested taking ROC of this MA as a measure of rising volumes. The period to be used was decided as 5 days. At the end we agreed to it but also felt that this should be left to the implementing individuals.

AT PRESENT THE MA OF VOLUME AND ITS ROC, THE PERIOD BEING 5 DAYS, IS SUGGESTED AS A GUIDELINE TO RANK THE SIGNALS. MEMEBERS ARE FREE TO USE IT OR NOT TO USE. ANY OTHER SYSTEM OF RANKING IS NOT ALLOWED TILL A THOROUGH DISCUSSION WITH ALL MEMBERS.

4) The next point was the hot topic at present, which is STOP LOSS. After a prolonged discussion on this issue it was agreed that the present method definitely needs a re-look. But it was felt that we three can not make any suggestions on this without all other members joining the discussion. So the present system of Stop loss will continue. Next Saturday it should be possible for all the members to participate and STOP LOSS should be an important issue to be discussed.

THEREFORE THE PRESENT SYSTEM OF APPLYING STOPLOSS WILL CONTINUE FOR ONE MORE WEEK.

5) The next point discussed was that of a common reporting format. Murthy and I had already written about this. After hearing views of rpc also it was decided that we must report in a common format. ALL signals generated should be reported, not only the traded ones. The BUY and SELL signals should be grouped separately, arranged alphabetically and typed in a single column. The trades should be separately listed, all buys and sells grouped separately and ordered alphabetically. In case of BUY, the Stoploss price (which is at present 95% of buy price) should be reported. Rpc will post a model format for reporting.

ALL MEMBERS ARE REQUESTED TO REPORT IN THE MODEL FORMAT.

6) An additional point was brought up by me. It was regarding changes to the system. I have discovered a shortcoming in my present system where some BUY/SELL signals do not get generated. The correction is available but not included so far. So, I asked whether I can make the necessary changes. Murthy agreed that creator of the system should have the opportunity to change it. He also said all the creators of the systems should also get the chance to change. Rpc also voiced that he also is not completely happy with his system. In the earlier session it was suggested that such cases should be presented during the chat session with reasons. After approval of the members the changes can be made. As only three of us were present the decision to change was postponed. Murthy suggested that in the meanwhile, the changed codes be posted along with the reasons for change so that the members can assess the case and in the next meeting take a decision. All the creators of the systems can therefore present their cases if change is needed. The modified code along with the reasons should be posted latest by Thursday so that on Saturday it can be discussed. As Sanjay has suggested continuation of the test for two weeks, the review of changes can be taken up next week.

THEREFORE ALL THOSE WHO WANT TO MAKE MODIFICATIONS TO THEIR SYSTEMS MAY POST THEIR MODIFIED CODE WITH REASONS FOR CHANGES BEFORE THURSDAY.

The session ended with Murthy's concluding views and a request to rpc to post the model reporting format.

The next session will be held on Saturday, 23-12-06 at 9:30pm. Please be present at the appointed time. The discussions will be held in 'Sysimp' room.

Regards

-Anant
 

asnavale

Well-Known Member
Hi rpc,

I am enclosing the modified code with this post. I have made following changes:

1) Deleted the two variables 'start' and 'end' in your original code and replaced with a single variable 'MyDt'. As you need to generate the signals for a single day, you need only one variable.
2) Added a new variable 'D' of date type which is required for comparison.
3) Changed the hard coded watchlist number 14 in to a selectable parameter. This helps in saving the signals in any of the 64 watch lists available.
4) Shifted the categoryremovesymbol statement to the top of code. Not necessary to do. Just to keep the initial variables and operations at the top.

The default value for MyDt is 6-12-2006 as you had used. There is no mimimum or maximum value. Any date can be selected from 'parameters'.
The default value for watchlist parameter is 14 as you had fixed in your original code. The minimum I kept is 5 because I had my data in first five watch lists (no. 0 to 4). You can change this to whatever you want. The maximum is 63 as only 64 watch lists (no. 0 to 63) are allowed. You can select any watch list via parameters. The stocks selected by the afl will be stored in this watch list.

In your original code you were using lastvalue(BUY) as the criterion to add the stock to watch list. That is why you always got the data for last availble date stored irrespective of the selected date. This is because, Ami performs the calculations on all available data irrespective of what parameters are selected. Only those results will be displayed which satisfy the conditions given in the Analysis window. Therefore, You always had the signals available for the last day and therefore only the last day's signals were stored becuse it was evaluating 'lastvalue(BUY)' to the last day's signal and not to the date you wanted.

By introducing the new date variable 'D' which takes the date for each bar and comparing this with the specified date ('MyDt') we are able to select only those signals which match our date condition.

I have not changed any other portion of your code.

If you need any more changes please do post.

In case you find any difficulty in getting output please do any or all of the following:
1) Manually empty the watchlist in which you want the results to be stored
2) Clear the results from Analysis window.
3) Select the parameters once again
4) Close the Analysis window and open again.

After doing this run the analysis again.

If still having problems, close Ami and restart.

Hope the code will work the way you want.

Please change the attached file extension to afl

Regards

-Anant
 
Last edited:

asnavale

Well-Known Member
Hi friends,

Following signals are generated by MABIUTS-HB system based on the EOD data for 15-12-2006.

*********************
BUY:

ABB .................... ACC ................ BAJAJAUTO ........ BANKBARODA
BANKINDIA ......... BATAINDIA ..... BEML ................. BHARTIARTL
BRFL ................... CANBK ............ CESC ................ CUMMINSIND
DCMSRMCONS ..... ESTL ............... FEDERALBNK ..... GHCL
GITANJALI ........... GLENMARK ...... GTL ................... GUJALKALI
GUJAMBCEM ......... HDFC .............. HDFCBANK ........ HEROHONDA
HINDALC0 ............ HINDLEVER ..... IDBI ................. IDFC
IFCI ..................... INDUSINDBK ... INFOSYSTCH ..... INFOTECENT
IPCL ..................... JAGRAN ........... JSTAINLESS ...... JSWSTEEL
KEI ...................... KOTAKBANK ..... M&M ................. MAHSEAMLES
MARUTI ................ MCDOWELL-N ... NAGARCONST .... NATIONALUM
NDTV ................... ONGC ............... ORCHIDCHEM .... ORIENTBANK
PATNI .................. PBAINFRA ......... RELCAPITAL ....... SAKHTISUG
SESAGOA ............. SKUMARSYNF .... SRF ................... STER
SUNPHARMA ......... SUNTV .............. TATAPOWER ....... TATASTEEL
TATATEA ............... TCS .................. TULIP ................ UNIONBANK
UTIBANK ............... VOLTAS ............ VSNL

--------------------------

SELL:

I-FLEX
***********************

Buying on 18-12-2006 will not be possible as maximum available funds are already invested.

*****************
DISCLAIMER

THESE ARE NOT ANY RECOMMENDATIONS TO BUY OR SELL. THESE ARE SIGNALS GENERATED BY THE SYSTEM BEING TESTED UNDER SYSTEM IMPLEMENTATION EDUCATION EXCERCISE. ANYBODY ACTING ON THESE WILL BE SOLELY RESPONSIBLE FOR THEIR ACTIONS.

******************


Regards

-Anant
 
Last edited:

Similar threads