Tuesday, July 31, 2012

How much can you lose in equity?


How much can you lose in equity?
 
 
Posting in Full :
 
People, sometimes, have no rules, limits, and have no clue on how to invest in equities. These people can, should and do lose their shirt, pants and undergarments and full well deserve it.



Let us say you are a well qualified, sensible, boy or girl and wish to invest in equities. Well if you do not want to be an active participant, you could choose a mutual fund. If you do not trust fund managers (I trust only 5 out of the 100 odd that I would have met), choose an index fund – the cheaper (and with lesser tracking error too) the better.
But if you want to be a little more adventurous and wish to invest in direct equities follow these rules so your losses are limited to the minimum.


Let us say you are 35 years and wish to create a portfolio. You are a woman, earning Rs. 8 lakhs, and are not the primary provider of the house. So you can take a little more risk than a man, who is the primary provider.
So let us say you have Rs. 10 lakhs to invest, and influenced by this site, you decide to put Rs. 8 lakhs in equities.



Rule No.1: NOT more than 80% of the SECONDARY earner’s portfolio will be in equities.


Rule No. 2: NOT more than 5% will be invested in ONE Company, as an initial investment. In case the share does well, we will LET it go up to 25% of one’s EQUITY portfolio. Anything in excess will be constantly sold off.
Let us say you are able to add Rs. 20,000 to the equity portfolio every month, and this share is also going up every month, it will take a real long time to breach the upper limit (unless you have picked one diamond and all other duds!).


Rule No. 3: Industry diversification I will learn or copy from a good fund manager’s portfolios, and I will buy only in group A, or B1. I will NOT touch a share in group B2, or T2T….even if someone says these are future blue-chips.


Rule No. 4: I will keep a 25% trailing stop loss. Let me explain. You have bought Rs. 40,000 worth of Carborundum Universal (my examples are obviously from my portfolio, and my cost of this share is Rs. 3.59 per share, thanks to split and bonus, so if you want to copy me, go to 1990, or create your own portfolio). Suddenly the shares value falls to Rs. 30,000. You will do nothing. However on the day it falls below 30,000, you will sell. Knowing how to cut losses is as important as knowing how to let profits run.

Rule No. 5: I will review my portfolio on a quarterly basis. I have no business managing my own portfolio unless I can beat the index. Clearly if you beat the index for the first year, then the second year, then the third year…you are doing well. If you do not beat it for the first four quarters – and are trailing by a huge margin, sell and go to a good fund house.



Now, With all these rules in place how much can you lose?

Rs. 800,000 is the total investment, Rs. 40,000 is the maximum exposure to one stock, 25% is the trailing stop loss- so you can lose about Rs. 10,000.

Considering your liquid net-worth is Rs. 10,00,000 you stand to lose about 1% of your net-worth. Not an amount you need to lose sleep over.

Kartviryarjun defeated Ravan

Ravan was always looking for somebody who could be a match to him in strength. On finding any such person, Ravan challenged him to a duel.


There was a king named Kartviryarjun. He was also named Sasrarjun because he had thousand hands.(The word Sahasra means thousand). He got thousand hands as a boon from Lord Dattatreya(incarnation of Lord Vishnu). In brief he is also called as Arjun. But one must not confuse him with Arjun of Mahabharat.



Ravan heard of Kartviryarjun power and went to challenge him. Before challenging Kartviryarjun, Ravan saw river Narmada. He went to the bank of Narmada and started offering worship to Lord Shiva. He found that water started flowing in opposite direction. Ravan asked his men to find out the reason. They found that at some distance Kartviryarjun was taking bath in Narmada. Some women of his gynaecium were with him. He made water flow in opposite direction with his thousand hands.

Ravan got angry that his puja was interrupted because of Kartviryarjun and wanted to have war with him. Ravan's ministers advised him that Kartviryarjun was relaxing in the water of Narmada at that time and was also in the company of women, therefore it was not appropriate to challenge him at that time. But Ravan did not listen.

Initially there was war between Ravan's soldiers and Kartviryarjun's soldiers. When Kartviryarjun was still inside water, Ravan's soldiers had upper hand and they were destroying the soldiers of Kartviryarjun. Kartviryarjun came out without any worry and defeated the soldiers of Ravan. He challenged Ravan to have single combat. Ravan and Kartviryarjun fought. Kartviryarjun easily won. He took Ravan to his(Kartviryarjun's) jail and imprisoned him.



Ravan's grandfather Pulastya came to know of this. He reached Mahismati(Kartviryarjun's capital) and requested Kartviryarjun to release Ravan. Since Kartviryarjun defeated Ravan, therefore he had the right to take anything from Ravan. If he wanted, he could also take Ravan's kingdom. But, out of respect for the great sage Pulastya, Kartviryarjun did not ask for anything and released Ravan. Not only that, he even accepted Ravan as his friend.

Some stories say that sage Pulastya asked Kartviryarjun to free Ravan and some say that Lord Brahma did that. It is possible that both Lord Brahma and sage Pulastya went to Kartviryarjun.

Friday, July 27, 2012

regexp_substr Handle CSV Data


REGEXP_SUBSTR(source_string, pattern
[, position [, occurrence
[, match_parameter]]])

  1. 'source_string' is a character expression that serves as the search value.
  2. 'pattern' is the regular expression. It is usually a text literal.
  3. 'position' is a positive integer indicating the character of
  4. 'source_string' where Oracle should begin the search. The default position is 1.
  5. 'occurrence' is a positive integer indicating which occurrence of pattern in source_string Oracle should search for. The default is 1.
  6. 'match_parameter' is a text literal that lets you change the default matching behavior of the function.
  7. 'match_parameter' can be a combination of
    1. i: to match case insensitively
    2. c: to match case sensitively
    3. n: to make the dot (.) match new lines as well
    4. m: to make ^ and $ match beginning and end of a line in a multiline string

-- match 'call', 'caller', 'called', or 'calling' in the string

SELECT REGEXP_SUBSTR('You have called me too often, she said.','call((ing) (er) (ed))')
FROM dual;
 
Handle  CSV data
select '...'||LTRIM(regexp_substr('I had a dog, he had white fur, his name was Bob.','[^,]+', 1,level) ), level from dual
 connect by
regexp_substr('I had a dog, he had white fur, his name was Bob.', '[^,]+', 1, level) IS NOT NULL


DECLARE
--
p_csv VARCHAR2(1000):= '688646,688563,807141';
p_csv1 VARCHAR2(1000):='27057931H,18025414H,18025415H,27057934H,27057937H,27061344H,27061345H,18025405H,18025408H';
--
CURSOR c
IS
SELECT serial_number
FROM mtl_serial_numbers
WHERE rownum < 12
AND inventory_item_id IN (
select regexp_substr(p_csv,'[^,]+', 1,level)
from dual
connect by
regexp_substr(p_csv, '[^,]+', 1, level) IS NOT NULL
);

CURSOR c1
IS
SELECT inventory_item_id
FROM mtl_serial_numbers
WHERE 1=1
AND serial_number IN (
select regexp_substr(p_csv1,'[^,]+', 1,level)
from dual
connect by
regexp_substr(p_csv1, '[^,]+', 1, level) IS NOT NULL
);

BEGIN

--
FOR i IN C
LOOP
--
dbms_output.put_line(i.serial_number);
--
END LOOP;
--
FOR i IN C1
LOOP
--
dbms_output.put_line(i.inventory_item_id);
--
END LOOP;
--
END;

Tuesday, July 24, 2012

MTL_RESERVATIONS


On 11.5.10.2 in Production:
Find that when Customer creates Org Level Reservations for Internal  Sales
Orders. If  partial quantity  gets Pick  released and Shipped,  the Org
Level Reservation  for the remaining Back ordered qty  gets relieved.

EXPECTED BEHAVIOR
-----------------------
Expect the reservation should split , and the new line should carry the Org
Level reservation of the remaining qty.

STEPS
-----------------------
The issue can be reproduced at will with the following steps:

Item Number : XXXXXX
OHQ Picture:
Sub: Secondary LPN1 : 100 qty
Sub: Secondary LPN2 : 100 qty
Sub: Primary Loose : 25 (Not packed)

1) Internal  requisition / Internal Sales Order created for 150 qty
2) Org   Level reservation is created for 150  qty

3) Pick  Release  WITH  PRIOR RESERVATION
4) Based on the WMS Rule (Allocate Full LPN)  system can allocate only  125
(Lpn1 100qty + 25 loose)
5) At this point  the STF shows the following
Released to  Warehouse : 125 , Back  Ordered : 25
6) At  this Point, the mtl_reservations shows
reservation_quantity = 150   and  detailed_quantity = 125
7) After  the Pick  Confirmation , in the mtl_reservations , the
reservation_quantity  changes to
125 , with  Staged_flag = Y
8) Expect the reservation should split , and the new line should carry the
Org Level reservation of the remaining 25 qty.

BUSINESS IMPACT
-----------------------
The issue has the following business impact:
Due to this issue, the  Business Rules which  were set up  for reservations
now have no meaning because of the problem, and it is causing considerable
loss of Business of the organization.

Monday, July 23, 2012

Sri datta Sharanaashhtakam

dattaatreya thava sharaNaM, dattanaadha thava sharaNam. ..

Oh Dattatreya, Datta natha, I surrender to you.

triguNaatmaka triguNaateetha
tribhuvana paalaka thava sharaNam. .
shaashvatha muurthe thava sharaNaM
shyaama sundara thava sharaNam. .. 1..


1. You are the three gunas - Satva, Rajas and Tamas. You are beyond the three Gunas. You are the protector of the three worlds. I surrender to you. You are eternal. You are Vishnu, the dark blue one. I surrender to you.

seshhaabharaNaa seshabhuushaNa
seshhasaayi guru thava sharaNam..
shaDbhuja muurthe thava sharaNaM
shaDbhuja yathivara thava sharaNam... 2..



2. A serpent is your ornament. You are adorned with a serpent. You are Vishnu reclining on the serpent Shesha. To that Guru I surrender. You have six arms and you are all pervading. You are a yathi with six arms. To that one I surrender.

danDa kamanDalu gadaa padmakara
shankha chakradhara thava sharaNam..
karuNaa nidhe thava sharaNaM
karuNaa saagara thava sharaNam. .. 3..


3. You are adorned with Danda, Kamandalu, Gada, Padma, Shanka and Chakra. To that Vishnu I surrender. You are an ocean of compassion. To that Dattatreya, I surrender.

shreepaada shree vallabha guruvara
narasiMha sarasvathi thava sharaNam.
shree gurunaatha thava sharaNaM
sadguru naatha thava sharaNam... 4..


4. You are Guru Sripada Vallabha, Narasimha Saraswati. You are Gurunatha and Sadgurunatha. To that Guru I surrender.

kRishNaa sangama tharuvara vaasi
bhaktha vatsala thava sharaNam.
kRipaa nidhe thava sharaNaM
kRipaa saagara thava sharaNam... 5..


5. You live in the Sangam of the Krishna river. You have love for devotees. You are an ocean of kindness. To that one I surrender.

kRipaa kaTaaksha kRipaavalokana
kRipaa nidhe prabhu thava sharaNam.
kaalaanthaka thava sharaNaM
kaala naashaka thava sharaNam.. 6..


6. Your very glance is grace for your devotees. You are a treasury of mercy. You are Time and you are the annihilator of Time, to that one I surrender.
poornananda poorna paresha
puraaNa purushha thava sharaNam.
jagadeesha thava sharaNaM
jagannaatha thava sharaNam.. 7..


7. You are full of bliss. You are perfect. You are Iswara, the giver of salvation. You are Vishnu, Lord of the three
worlds. To that Lord I surrender.


jagath paalaka jagadaadeesha
jagadoddhaara thava sharaNam.
akhilaanthaka thava sharaNaM
akhileshvarya thava sharaNam. .. 8..


8. Oh protector of the universe, you are the Lord of the whole world. You are the redeemer of the world. You are entire time and space. I surrender to you.
bhakta priya vajra panjara
prasanna vaktra thava sharaNam.
digaMbaraa thava sharaNaM
deenadayaa ghana thava sharaNam. .. 9..


9. You have love for devotees. Oh Lord Shiva, you are always the embodiment of peace. You are blue in color and you are the sky. You have compassion for the poor and the humble. To that one I surrender.

deenaanaatha deenadayaaLa
deenoddhaara thava sharaNam.
thapo muurthe thava sharaNaM
tejoraashi thava sharaNam. .. 10..


10. You are the Lord of the poor, you have mercy for the poor and you are the redeemer of the poor. Oh all pervading ascetic, you are brilliance. To that one I surrender.
brahmaananda brahma sanaathana
brahma mohana thava sharaNam.
vishvaatmaka thava sharaNaM
vishva rakshaka thava sharaNam. .. 11..

11. You are the Supreme bliss. You are ancient, timeless. You are Brahman engaged in divine play. Oh protector of the universe, you are the Supreme Being. I surrender to you.

vishvaaMbhara vishva jeevana
vishva paraatpara thava sharaNam.
vighnaanthaka thava sharaNaM
vighna naashaka thava sharaNam.. 12..



12. You are the Supreme Spirit, the all-pervading Vishnu. You are the giver of life for the universe. You are the
remover of obstacles. To that one I surrender.


praNavaateetha premavardhana
prakaasha muurthe thava sharaNam.
nijaananda thava sharaNaM
nijapada daayaka thava sharaNam. .. 13..



13. You are the OM. You are all pervading brilliance. You are bliss and the giver of salvation. To that one I surrender.

nitya niranjana niraakaara
niraadhaara thava sharaNam.
chidaatma roopa chidaananda
chitsukha kanDa thava sharaNam. .. 14..


14. You are ever-lasting, without blemish and formless. You are the support of all and the Supreme Spirit. You are
full of bliss and full of peace. To that Brahma, I surrender.


anaadi muurthe thava sharaNaM
akhilaavathaara thava sharaNam. .
ananthakoTi brahmaanDa naayaka
aghatitha ghaTana thava sharaNam. .. 15..


15. You are the beginning, the eternal and the complete avatar. You are infinite, endless. You are the Lord of the Universe. You are the movable and immovable Brahman. To that one, I surrender.
bhakthoddhaara thava sharaNaM
bhakta rakshaka thava sharaNam. .
bhaktaanugraha guru bhakta priya
pathithoddhaara tava sharaNam. .. 16..



16. You are the redeemer of devotees, the protector of devotees. One who has devotion towards Guru will receive the grace of Him who is the redeemer of the poor and humble. To that one I surrender.




http://stotraratna.sathyasaibababrotherhood.org/o36.htm

Investment in stocks- An old fashioned way

In other words, I rule out companies with these characteristics:
  1.Absence of dividend. A genuinely profitable company should pay out dividends. If the company does not pay dividends in spite of showing profits year after year, I avoid it
  2. Non-tax paying or low tax paying. A company that pays no tax or very low tax year after year is ruled out. If the profit is real, the company ought to be paying taxes;
  3. Companies with very high debt worry me. In a good year, the business will earn a rate of return higher than the interest cost, but could be in trouble in a bad year. If the company passes muster on all other criterion, then maybe I will probe further, but in general, high leverage is a red flag;
  4. Third generation family owned and managed companies. Indian companies are generally family owned and are passed down from father to son, like heirlooms, corporate governance be damned. Typically, in the third generation, the number of claimants increase and lead to a combination of poor management, siphoning and lack of focus;
  5. Companies that show profits year after year, but do not pay dividends and yet keep raising equity regularly;
  6. Change of auditors is a red flag.
 Investigate thoroughly. If not satisfied with the reasons, avoid the company;
  7. Companies that keep advertising even if they are not in the consumer space;
  8. Companies that are managed by so called professionals, but treat it like a fiefdom, engage in random diversifications that do not make any sense and award huge stock options;
  9. Companies where the promoter has several other unlisted companies which siphon profits. (I believe most Indian companies do this, so the level of check required to ascertain this may not be possible for everyone);  10. Suspect management integrity. This is the most subjective one and in most cases, it would be turn out to be a question of degree rather than one of principle. I have hardly come across any company which will pass total muster on this score, so have decided to be a bit practical and take my chances; 
11. Super normal profitability is another worrying sign. In most cases, this happens at a nascent stage, just around the time a company goes public and is planning further fund raising. If the whole industry is making 10% of sales as profit and someone is making 25%, my first instinct is to be sceptical. This is certainly a ‘red’ flag;
12. A ‘me-too’ company is one to be avoided. The company I choose should be clearly number one or two in its business. Only when you pick up companies that are in new segments (so called ‘sunrise’ industries like bio technology etc) can you look at small players. There is no point in looking at a small player in the textile business or in the FMCG business;   13. Companies in industries that are overly regulated by government. This is a debatable point, but I believe that given the circumstances, it will not be possible to dismantle controls on industries such as fertilizer, oil etc., Whilst ultimately it should happen, I prefer to keep away. In general, government interference (like in PSU banks) generally makes an investment less attractive whereas the event of government getting out completely from any company would make it more attractive.  14. In today’s funny accounting world, I am also wary of this thing called “consolidated’ accounts, when it includes profit shares of entities that are not 100% owned by the company. And, the companies do not even show the accounts of the subsidiaries on their websites!

After this, I use some financial screens of which I hold the ROE (Return on Equity) to be perhaps the most important criterion. I would like it be steady to improving. Generally, my attempt is to focus more on cash flows rather than mere earnings. For instance, in any industry, you can NOT provide for bad debts and show earnings. However, the cash flow picture would be terrible. I give high importance to management in terms of competence and integrity. I also like to see companies that have the potential to grow at more than the pace at which economy grows. For instance, if we expect industry to grow at 10% and inflation to be 5%, then the company has to grow at more than 15%. Financial analysis is simple, but needs time and effort. I usually like to sit with at least three years annual reports. Unfortunately, today I see the annual reports getting more opaque. Financial information shared with the investors is getting less and less. I get a lot of useless diatribe from the management under the head “management discussion”. Here, no company is going to openly admit its faults. You will get to read only good things or blame on external factors for poor performance. Real issues are buried. 

Thursday, July 12, 2012

Ramayan and Onam


Interesting Read.

A different view on Ramayan and the Source of Oman celebrations .
An excerpt

The only Malayalam picture that T and I watched together, just after we got married, had the Malayalam superstar ‘Mohan Lal’ as it’s hero. Just after the movie, I had heard T passing a comment, ‘Ayyyeeee, he looks like a monkey’. Thirty years later, during the Onam musings, it occurred to me that what she said had profound significance of how Hanuman (Bali or Sugreeva) came to be monkeys. ‘Hanu’ in Sanskrit, I believe, means a deformed face, one that juts out. The Malayalees (Nairs as well as those Nairs who converted to became Kuruvilas or Mathappans) have since time immemorial followed the custom of intermarriage and marrying their first cousins. The inbreeding led to several deformities that one can see even today in Kerala, that of monkey like jutting jaws, thick lips, hair lip, body patches with thick matting of hair, all of which when described, let us say to a descendant of Ram (like Laoo Prasad Yadav), who repeats it again and again over centuries in his inimitable style adding his own spice, may make a Malayalee Hanuman (Bali or Sugreev) like what T saw in Mohan Lal.  Mahabali could well have been a Malayalee !!!         

Integration of ADF with EBS

The details are in the following Metalink Note : 1296491.1
EBS SDK for Java : Metalink note : 974949.1.

Examples in detail are available at this wonderful Blog



Just the Summary, for details please refer to the metalink note.


1. What types of integration between EBS and ADF applications can I do?


There are multiple ways that ADF external applications can be integrated with Oracle E-Business Suite:



1."Back-end-only integration" to Oracle E-Business Suite data and services. For example, this may include using the Oracle SOA Suite on the back end, with Oracle Application Development Framework 11g (ADF 11g) on the front end. There is no user interface integration at all (that is, a user cannot go back and forth between the ADF UI and the Oracle E-Business Suite OA Framework UI). This type of integration typically uses the AppsDataSource feature but no other parts of the Oracle E-Business Suite Software Development Kit for Java.

2."Launch from Oracle E-Business Suite integration" may include back-end integration as above, but in this case, the Oracle ADF user interface is launched from the Oracle E-Business Suite home page. There is no further user interface interaction with Oracle E-Business Suite (users cannot return to the OA Framework home page, for example). See "How do I launch an ADF application from the EBS Home Page?" below.

3."Full user interface and back-end integration" allows users to move back and forth between the ADF user interface and the Oracle E-Business Suite user interface. For example, a user could go to an ADF page from an OA Framework page and back again, or ADF components could be embedded into an OAF page. This requires some session context being shared between OAF and ADF, as well as session management between the two systems. With the release of the Oracle E-Business SDK for Java Version 2, session management routines are now available for these "shared session applications". Version 2.0.1 is Patch 13882058 (replacing Version 2.0.0 Patch 13562125).

Concurrent program Request Groups

SELECT e.executable_name , concurrent_program_name , user_concurrent_program_name , grp.REQUEST_GROUP_NAME FROM fnd_request_group_units u , fnd_request_groups grp , fnd_executables e , fnd_concurrent_programs_vl fcp WHERE u.request_unit_id = fcp.concurrent_program_id AND fcp.executable_id = e.executable_id --AND concurrent_program_name IN --AND user_concurrent_program_name like '%Clear Orphan%' AND grp.request_group_id = u.request_group_id ORDER BY 1