Monday, December 31, 2018

Chutney : Tomato and Onion

https://www.indianhealthyrecipes.com/onion-tomato-chutney-recipe/

Khichdi - rice and washed moong dal


Take 3/4 the rice and 1/4th washed moong dal

Put both in water together for 30 mins.

Just add little oil, onion, tomato, turmeric, some red chilli, salt

Add very little peas, carrot and cut beans

Put water double of rice.

On Sim : 3 whistle

Sunday, December 30, 2018

Health Checkup - 2018

Health Checkup - 2018

Swasth Plus Health Basic  / Swasthfit Basic Health Checkup  

(Dr Lal Path) : 1399 Rs

* 12 hour fasting mandatory

https://www.lalpathlabs.com/pathology-test/swasth-plus-health-basic-panel-dncr


Package Details
Profile/Component
GLUCOSE, FASTING (F)
HbA1c; GLYCOSYLATED HEMOGLOBIN
URINE EXAMINATION, ROUTINE; URINE, R/E
CHOLESTEROL, TOTAL
DLC (DIFFERENTIAL LEUCOCYTE COUNT), AUTOMATED
ESR; ERYTHROCYTE SEDIMENTATION RATE
HDL CHOLESTEROL, DIRECT
HEMOGLOBIN; Hb
HEMOGRAM
LIPID PROFILE, SCREEN
MEAN CORPUSCULAR HEMOGLOBIN CONCENTRATION; MCHC
MEAN CORPUSCULAR HEMOGLOBIN; MCH
MEAN CORPUSCULAR VOLUME; MCV
PACKED CELL VOLUME (PCV); HEMATOCRIT
PLATELET COUNT
RED BLOOD CELLS; RBC COUNT
RED CELL DISTRIBUTION WIDTH; RDW
T3, TOTAL
T4, TOTAL
TLC (TOTAL LEUCOCYTE COUNT)
TRIGLYCERIDES, SERUM
TSH (THYROID STIMULATING HORMONE)
THYROID PROFILE, TOTAL

5th Vital : Complete Health Package with Vitamins - 62 Tests


    ? 3,448.00
    ? 1,499.00

INCLUDES

    Thyroid Profile
    Lipid Profile
    LFT
    KFT
    Calcium (Calcium total)
    Electrolytes
    CBC
    FBS (Fasting Blood Sugar) & HBA1c (Hemoglobin A1C : 3 month blood glucose average)
    Iron
    Vitamin D (D-25 Hydroxy)
    Vitamin B12

Sakra : Customized Profile

2800 Rs - CGHS (check executive health checkup for 4000 Rs. Some tests may be missing. But, includes X-Ray, Ultrasound and ECG included.)

    Vitamin D (D-25 Hydroxy)
    Vitamin B12
    Lipid Profile (For Cholestrol)
    KFT (For serum Createnine etc)
    FBS (Fasting Blood Sugar)
    HBA1c (Hemoglobin A1C : 3 month blood glucose average)
    CBC (includes Hemoglobin and MCV to detect anemia)
    Thyroid Profile (T3, T4, TSH etc)
    LFT (SGPT etc)
    Calcium (Calcium total)
   Electrolytes (Sodium, Potassium etc)

Friday, December 28, 2018

Industry Analysis - Insurance

Industry Analysis - Insurance


Comprises both : General Insurance and Life Insurance

World ranking

  • France
    • Axa
  • German
    • Allianz
    • Munich Re
    • Telanx
  • Italy
    • Generali
  • UK
    • Prudential
    • Aviva
    • Standard life
  • US
    • Prudential Financial
    • Metlife
    • AIG
    • Allstate
  • Switzerland
    • Zurich Insurance Group
    • Swiss Re
  • Japan
    • Dai-ichi life
    • MS (Mitsui Sumitomo) & AD (Aioi Nissai Dowa) Insurance Group
    • Tokio Marine holdings
    • Sompo holdings
  • Netherlands
    • Aegon
  • Canda
    • Manulife

India ranking

  • HDFC Standard life
  • ICICI Prudential life
  • ICICI Lombard general (Fairfax financial holdings : 36%)
  • SBI life (BNP Paribas Cardif : 12%, Carlyle : 9%)

Key Indicator

  • Gross Written Premium (GWP)
  • Solvency Ratio

References

Thursday, December 27, 2018

Industry analysis: Bank

Industry Analysis : Bank


By total assets.

World rankings


  • USA
    • JP Morgan
    • Bank of America
    • Wells Fargo
    • Citigroup
    • Goldman Sachs
    • Morgan Stanley
  • Japan
    • Mitsubishi ufj financial
    • Japan post bank
    • Sumitomo Mitsui financial group
    • Mizuho financial group,
  • UK
    • HSBC
    • Barclays
    • Lloyds banking group
    • RBS - royal Bank of Scotland
    • Standard chartered
  • China
  • France
    • BNP Paribas
    • Credit Agricole
    • Societe Generale
  • Germany
    • Deutsche bank
  • Canada
    • Royal Bank of Canada
  • Netherlands
    • ING Group
    • Rabobank
    • ABN AMRO is another leading player in big 4
  • Australia
    • Commonwealth bank
    • Australia and New Zealand banking group
  • Spain
    • Banco Stander
  • Italy
    • UniCredit
    • Intesa Sanpaolo
  • Singapore
    • DBS ( Development Bank of Singapore) - big 4 of Singapore. 
    • Not in top 70.

India rankings

  • SBI Bank
  • HDFC Bank (JP Morgan Chase - 24%)
  • ICICI Bank (Deutsche Bank : 24%)
  • Kotak Bank (ING : 7% after merger of ING Vyasa)

References

Tuesday, December 25, 2018

Industry Analysis : Healthcare


Industry Analysis : Healthcare

World Ranking

Not in order.To be updated.
  • Ramsay Health Care - leader in Australia and France
  • Ascension Health - USA 
  • IHH Health Care (Parkway Pantai) - Malaysia, Singapore, Turiks

India Ranking

  • Apollo Hospitals
    • Hospitals : 32
    • Beds : 4500
  • Narayana Health
    • Hospitals : 20
    • Beds : 5100
  • Fortis Healthcare
    • Hospitals : 28
    • Beds : 3600
  • Max Hospital
    • Hospitals :14
    • Beds : 2300
  • HCG
    • Hospitals : 18
    • Beds : 1300

KP Indicators

  • Occupancy
    • Beat Sector Average
      • Sector Average : 60%
  • Other metrics
    • Cost per bed
      • Lesser is better
    • Doctors per bed
      • Lesser is better
    • Support staffs per bed
      • Lesser is better
  • Percentage of visiting doctors
    • Less than 5% for both Apollo and HCG) - Good in Long term.
    • Approx 50% for Fortis, NH and Max hospital - Good in short term
  •  Property - owned or leased
    • Owned - Good in long term
      • Apollo ( owned > leased)
    • Leased - Good in short term
      • HCG, NH and Fortis ( Leased > owned)

Research Report :

https://www.dsij.in/productAttachment/premarketreport/Market_Healthcare_Edelweiss_24.03.18.pdf

Sunday, December 23, 2018

plotly - basic plotting for bar chart



plotly - good for plotting in python.

Integrates well with .csv file and can check the plots online.


For python.h issue, $ yum install python-devel

# for image generation

pip install psutil




jupyter


To install juputer and any other python packages for just a user in $HOME/.local/bin


pip install jupyter --user

Friday, December 7, 2018

Industry Analysis: Movie Theater

Industry Analysis

Movie Theater

World rank

Cinepolis - 5300 screens (wr 4), 339 million admissions (wr 2)

https://en.wikipedia.org/wiki/List_of_movie_theater_chains#Global_cinema_chains



1 AMC USA 11,247 1,027[1]
2 Cineworld United Kingdom 9,539 793
3 Cinemark USA 5,957 533[2]
4 Cinépolis Mexico 5,251 335[3]
5 CGV South Korea 3,459 463[4]
6 Cinemex Mexico 2,861 332[5]
7 VUE United Kingdom 1,989 228
8 Cineplex Entertainment Canada 1,676 164[6]
9 Pathe France 1,091 111
10 Kinepolis Belgium 850 97[7]


PVR is getting closer to be in world's top 10.

India rank

Criteria : (screens, properties, cities)

PVR - 800 s, 160 p, 60 c
Inox - 500 screens, 126 properties, 61 cities
Cinepolis (Mexico based movie chain) - 300 screens

Additional Data

PVR Description

Cities : 60 approx
Properties : 160 approx
Screens: 740 approx
Seats : 1Lac 70 K

Target

2k screens 

Screen setup cost:

Pvr Gold class : 5.5 cr
Pvr Regular: 3 cr
Pvr Talkies : 1.75 cr (tier 2)

Recovery period : ?
Occupancy :70 %

Wednesday, November 14, 2018

Industry Analysis : Telecom

Industry Analysis : Telecom

 

Global 

  • AT & T  - USA
  • Verizon - USA
  • China Mobile - China (Hong Kong)
  • Deutsche Telekom - Germany
  • Softbank - Japan
  • NTT - Japan
  • Vodafone - UK
  • China Telecom - China
  • Telefonica - Spain
  • Orange - France 
  • Xfinity (comcast) - USA

Domestic

  1. Vodafone Idea (JV with a global biggie)
  2. Bharti Airtel
  3. Bharti Infratel - Tower company
  4. Reliance Jio (not listed - owner Reliance Industries) 

Parameters

  • Primary : ARPU (Average Revenue per user) - more is better
  • Secondary : Revenue and Profit

Saturday, November 3, 2018

Industry Analysis - Tyre

Industry Analysis - Tyre

World Ranking

  • Bridgestone - Japan
  • Michelin - France
  • Goodyear - USA (India subsidiary)
  • Pirelli - Italy
  • Apollo Tyres - India (WR 5)
  • MRF Tyres - India (WR 6)
  • Continental Tyre - Germany
  • Dunlop - USA
  • Yokohama - Japan
  • Hankook - South Korea

India Ranking

  • MRF
  • Apollo Tyres
  • J K tyres
  • CEAT
  • TVS Srichakra 
  • Goodyear India

Industry Analysis : Steel

Industry Analysis : Steel


World Ranking

  • ArcelorMittal - Luxembourg
  • Nippon Steel and Sumitomo Metal Corporation - Japan
  • Hebei Iron and Steel - China
  • Baosteel - China
  • Wuhan Iron and Steel - China
  • POSCO - South Korea
  • Jiangsu Shagang - China
  • Tata Steel - India (World Ranking : 8)
  • Hyundai Steel - South Korea
  • JFE Steel (earlier known as Kawasaki Steel) - Japan

India Ranking

  • Tata Steel
  • JSW Steel (JFE is part owner)
  • SAIL

Industry Analysis : Cement

Industry Analysis : Cement

Cement : consists of Grey cement, white cement and ready-mix concrete.

World leaders:

  • LafargeHolchim (France and Switzerland merger) - WR - 1
  • Heidelberg Italcementi (German and Italian merger) - WR 2
  • China (7 companies) - CNBM, Anhui Conch, Jidong, China Resources, Sinoma, Shanshui, Taiwan Cement
  • Cemex - Mexico
  • Votorantim - Brazil
  • UltraTech - India (WR - 14)
  • EuroCement - Russia

India leaders:

  • UltraTech Cement (IR 1)
    • UltraTech grey cement capacity - 100 mtpa  approx - year 2018
    • Birla white and Wallcare putty - 1 mtpa approx - year 2018
    • Ultratech RMC (Ready Mix Concrete) plants - 100 plus - capacity ? - year 2018
  • ACC (brands of Lafarge Holchim - IR2)
    • ACC -  33 MT
  • Gujarat Ambuja (brands of Lafarge Holchim - IR3)
    • Ambuja - 30 MT
  • Shree cements (IR 4)
    • Capacity - 30 MT
  • Dalmia Bharat
    • Capacity - 20 MT
  • Nirma (unlisted) - bought existing assets of Lafarge.
    • Capacity - 14 MT
  • JSW Cement - Sajjan Jindal - Unlisted
    • Capacity - 12 MT
  • Heidelberg
    • Capacity - 5 MT

Tuesday, October 30, 2018

Industry Analysis : Pants & Coatings

Industry Analysis : Pants & Coatings


Part of chemical Industry.


World leaders :

  • PPG (Pittsburg Paints group) - USA, Pittsburg
  • Akzo Nobel - Germany (India subsidiary also)
  • Sherwin Williams - USA, Cleveland
  • RPM International - USA, Ohio, Medina
  • Nippon Paint - Japan, Osaka
  • Axalta - USA, Philadelphia
  • Valspar - USA, Minneapolis
  • BASF coatings - Germany
  • Kansai Paint - Japan (India subsidiary also)
  • Asian Paints - India (World No 10)
  • Berger Paints - India (World No 15)

* NOTE : Revenue of Akzo nobel and Kansai Nerolac are clubbed with parent companies.

India Leaders : 

  • Asian Paints
  • Berger Paints
  • Kansai Nerolac
  • Akzo Nobel

Fundamentals 

Sunday, October 28, 2018

Industry Analysis : Poultry

Industry Analysis : Poultry

Input : soya and corn : monitor cost
Producer : Poultry industry in India, the fourth largest producer of chicken after the the U.S., Brazil and China.

World leader

  • JBS (Brazil)
  • Tyson Foods (USA)
  • BRF (Brazil)
  • CP Foods (Thailand) - Five Star Chicken
  • Wen's Food Group (China)

India leader

  • Venkys
  • Suguna (unlisted)
  • Godrej Agrovet (Tyson USA) - Real Good Chicken

NOTE:

Venky's misadventure : unnecessarily in soccer sports group Blackburn (English premier league) at cost of company.

stocks : 2018 : Q3 : bought


Equity Stocks : 2018 Q3  (Oct) : Buy


Bought due to good fundamentals - L1


BSE
DCM Shriram
Ashok Leyland
Tata Elxsi
Avanti Feeds

Bought due to good fundamentals - L2

HPCL
CEAT
PC Jewellers
Essel Propack
Brigade Enterprise

Uflex
NLC
Heidelberg cement
TVS Shrichakra
Goodyear India
Motherson
Rajesh Exports


Skipped with good fundamentals - L2 (acquired in 2018 / hit the target limit)

VST tillers - already 2k
Akzo nobel
Cadila
UPL - already 5 K
Nilkamal
KRBL
Adani ports
Century ply
PI Industries
Aegis
Aurobindo pharma
Venkys - already 2k
Varun beverages


Bought without looking at fundamentals (>50% drop in holding)

Tata Motors
Idea Cellular
Somany Ceramics

Wednesday, August 1, 2018

Top Equity Stocks 2018

Sector : Auto & Tyres
Industry : Auto & Tyres
Sub Industry: Cycle
Tube investment
Sub Industry: 2-W
Hero motocorp
TVS Motors
Bajaj Auto
Eicher - Royal Enfield
Sub Industry: 4-W
Maruti Suzuki
Tata Motors
Mahindra & Mahindra
Sub Industry: Tillers
VST Tillers & Tractors (leader in Tillers)
Tata Motors
Mahindra & Mahindra
Sub Industry: Auto Ancillary
Motherson Sumi (Sumitomo Wiring)
Sub Industry: Tyres
MRF (Toys also : FunSkool)
Apollo Tyres
CEAT
JK tyres
Balkrishna Industries (leader in off-road tyres)
Sub Industry: Auto components
Mahindra CIE (casting)
SKF India (bearing)
Asahi glass (mirror)
Sub Industry: Batteries (Duopoly)
Exide
Amara Raja Battery



Sector : BFSI
Industry : Bank
Sub Industry: Private Bank
HDFC Bank
ICICI Bank
SBI Bank
Axis Bank
Kotak Mahindra Bank
Sub Industry: Public Sector Bank
SBI
Industry : Finance (NBFC)
Sub Industry: Housing
HDFC
LIC Housing finance
Indiabulls housing finance
Sub Industry: Gold
Muthoot Finance
Manappuram finance
Sub Industry: Vehicle
Shriram Transport finance

Industry : Insurance
Sub Industry: General Insurance
ICICI Lombard
New India Assurance
Sub Industry: Life Insurance
SBI Life
HDFC Standard Life
ICICI Prudential Life
Sub Industry: Reinsurance
GIC Re (monopoly)
Industry : Finance & Insurance
Sub Industry: Financial Services
Bajaj FinServ
Mahindra & Mahindra Finance
L&T Finance Services
Tube Investment Financial Holdings
Industry : Others
Sub Industry: Credit Rating
CRISIL
ICRA
CARE
Sub Industry: Trading
BSE - Stock exchange
MCX - Commodity exchange (monopoly)
ICICI Securities - Broker
CDSL - Depository Services
Sub Industry: AMC
HDFC AMC - Asset Management Company



Sector : Energy
Industry : Oil & Gas
Sub Industry: Oil & Gas Exploration
Reliance
ONGC
Oil India
Sub Industry: Oil & Gas Retailers
HPCL (owned by ONGC now)
Indian oil
BPCL
Sub Industry: Oil & Gas Terminals (import)
Petronet LNG
Sub Industry: Gas pipeline to home
GAIL
Sub Industry: Lubricant
Castrol (leader : BP company)

Industry : Power
Sub Industry: Power Generation
NTPC : Thermal (Coal)
NHPC (Hydro)
NLC (Neyveli Lignite)
Tata Power (integrated)
Sub Industry: Power Transportation
Power Grid
Adani Transmission
Sub Industry: Power Finance
Power finance corp (PFC)
Rural Electrification Corp (REC)

Sector : Materials
Industry : Materials
Sub Industry: Cements
UltraTech
ACC (owned by Lafarge Holcim)
Gujarat Ambuja (owned by Lafarge Holcim)
Shree cements
Sub Industry: Steel
JSW Steel
Tata Steel
Sub Industry: Iron
NMDC
Sub Industry: Aluminium
HINDALCO
NALCO
Sub Industry: Zinc
Hindustan Zinc (monopoly)
Sub Industry: Coal
Coal India
Sub Industry: Integrated player
Vedanta Resources
Sub Industry: Abrasives
Grindwell Norton
Carborundum Universal


Sector : Healthcare
Industry : Hospitals
Sub Industry: Hospitals
Apollo
Narayana
Fortis
Industry : Diagnostic
Sub Industry: Diagnostic
Dr Lal Path Labs
Industry : Pharma
Sub Industry: Pharma Domestic
Sun Pharma
Dr Reddy
Lupin
Cipla
Aurobindo Pharma
Glenmark
Sub Industry: Pharma MNC
Pfizer
Abbott
Sanofi

Sector : FMCG
Industry : Major
Sub Industry: Major
ITC
HUL
P&G
Dabur - honey, juices etc
Emami
Godrej consumer products
Sub Industry: Soft Drink & juices
Varun Beverages (Pepsi)
Sub Industry: Maggi
Nestle
Sub Industry: Horlicks
GSK Consumer
Sub Industry: Tea & Coffee
Tata Global Beverages
Tata Coffee
Sub Industry: Toothpaste
Colgate
Sub Industry: Shaving
Gillette
Sub Industry: Rice
KRBL
Sub Industry: Biscuits
Britannia
Sub Industry: Oil
Marico - Saffola and Parachute


Sector : Retail
Industry : Retail
Sub Industry: Retail
Future Retail (Big Bazaar, fbb, eZone, HyperCity)
Future Consumer (Brands ownership)
Shoppers Stop
Trent (Westside, Croma, Star Bazaar)
Avenue Supermart (D-mart)
Sub Industry: Clothes
Aditya Birla Fashion & Retail
Future Lifestyle & Fashion (fbb)
Page Industries (Jockey)
Arvind Limited
Lal Bhai group company.
Sub Industry: Jewellery (Oligopoly)
Titan Company (Tanishq, Fastrack, Titan)
Rajesh Exports (World’s largest gold refinery)
PC Jeweller (Too much volatile. To be dropped)
Sub Industry: Bags (Oligopoly)
VIP industries (Carlton at higher end, Skybags, Lavie, Aristocrat, VIP etc)
NOTES :
Global Competitor (Samsonite : high end and same company has American Express at lower end).
Domestic competitor Safari and Wild Craft is small.
Sub Industry: Shoes
lBata
Relaxo
Other players like Liberty, Khadim etc are small


Sector : Domestic Appliances (White goods)
Industry : Domestic appliances
Sub Industry: Fan
Crompton Greaves Consumer
Sub Industry: AC
Voltas
Blue Star
Johnson control : Hitachi
Sub Industry: Washing Machine
IFB Industries - domestic leader
Whirlpool - Global leader
Sub Industry: Refrigerator
?
Sub Industry: TV
?
Sub Industry: Pressure Cooker & Stove
TTK Prestige
I would have considered Hawkins but the website looks outdated and not in sync.
Sub Industry: Stabilizer
V-Guard
Sub Industry: Electrical Switches
Havells (Havells, CrabTree, Standard, Lloyd, REO)
Sub Industry: Batteries
Eveready
Can lithium ion batteries replace current batteries ? Is everyready involved in lithium ion batteries? Is expansion in tea retail (tej) domestic appliances enough for future ?


Batteries evolution - zinc carbon (traditional : use & throw), alkaline (rechargeable) and future technologies.


Sector : Hospitality (Hotels, Tours & Travels)
Industry : Hotels
Sub Industry: Hotels
Indian Hotels (Taj)
Oberoi - EIH (East India Hotels)
Mahindra holidays (Club Mahindra Resorts)
Sub Industry: Hospitality
Coffee Day Enterprise
Westlife development (McDonald)
Jubilant FoodWorks (Domino’s)
Sub Industry: Tours & Travels
Cox & Kings
Thomas Cook
Sub Industry: Facility Management
Quess Corp


Sector : IT & Telecom
Industry : IT
Sub Industry: IT Services
TCS
Infosys
HCL Tech
Wipro
Tech Mahindra
L&T IT (LTI)
Sub Industry: IT Hardware
L&T Technology Services
Sub Industry: IT Products
Info Edge India
Industry : Telecom
Sub Industry: Telecom Service Provider
Bharti Airtel
Vodafone Idea
Sub Industry: Telecom Towers
Bharti Infratel



Sector : Tobacco, Alcohol and Sugar
Industry : Tobacco
Sub Industry: Tobacco
ITC
Godfrey phillips
VST Industries
Industry : Alcohol
Sub Industry: Beer
United Breweries
Sub Industry: Hard drinks
United Spirits
Industry : Ethanol & Sugar
Sub Industry: Sugar
Eid Parry
Balrampur Chini
Shree Renuka Sugar

Sector : Agriculture & Animal Feed
Industry : Agriculture
Sub Industry: Seed
Kaveri Seed
Monsanto
Sub Industry: Fertilizer
Coromandel international
Chambal Fertilizers
Sub Industry: Pesticide & Insecticide (Agro Chemical)
PI Industries
Bayer CropScience
Rallis India
Industry : Animal Feed
Sub Industry: Chicken Feed
Venky’s
Sub Industry: Prawns, Fish & Shrimp Feed
Avanti Feeds
Sub Industry: Feed - mixed
Godrej AgroVet

Sector : Paints, Chemicals, Plastics & Packaging
Industry : Paints
Sub Industry: Paints
Asian paints
Nerolac
Berger
Akzo nobel
Sub Industry: Chemicals
Pidilite Industries (Fevicol)
UPL (United phosphorus)
Tata Chemicals
BASF (German Chemical Giant)
Check Agro-Chemicals also
Sub Industry: Plastics
Jain irrigation
Supreme Industries
Nilkamal
Sub Industry: Packaging
Essel Propack
Huhtamaki PPL
U-flex

Sector : Logistics
Industry : Logistics
Sub Industry: Bus
VRL Logistics
Sub Industry: Couriers
Blue Dart Express
Sub Industry: Railway Cargo
Container corporation
Sub Industry: Ship / Container
Shipping corporation of India
Allcargo logistics
Sub Industry: Aviation
Interglobe Aviation
Sub Industry: Ports
Adani Ports & SEZ
Sub Industry: Liquid Logistics (Oil - Petrol)
Aegis Logistics
Sub Industry: Retail Logistics
Future Supply Chain
Sub Industry: Auto Logistics
Mahindra Logistics

Sector : Infrastructure & Real Estate
Industry : Infrastructure & Real Estate
Sub Industry: Infrastructure
Larsen & Toubro
NCC
BHEL
NBCC
Engineers India
Siemens India
ABB India
Sub Industry: Real Estate
DLF
Lodha Developers
Prestige Estates
Godrej Properties
HUDCO
Brigade
Puravankara
Sobha

Sector : Diversified
Industry : Diversified
Sub Industry: Diversified
Piramal Enterprises (Healthcare, finance, toys)
3M
Godrej Industries
Grasim
Adani Enterprises
Sub Industry: TBD (Identify Category)
Cummins (Engines)
Bharat electronics (Electricals)


Sector : Uncategorized - 1
Industry : Uncategorized - 1
Sub Industry: Ceramics & Granite
Kajaria Ceramics
Somany Ceramics
Asian Granito
Sub Industry: Sanitaryware
Cera
HSIL
Sub Industry: Woodwork : Plywood
Century Ply
Greenply
Sub Industry: Woodwork : Laminate
Greenlam
Sub Industry: Mattress
Sheela foam (Sleepwell)

Sector : Uncategorized - 2
Industry : Uncategorized - 2
Sub Industry: Education
Zee-Learn (Kidzee & Mount Litera)
Sub Industry: Pumps
KSB Pumps
Sub Industry: Movie Theater
PVR
Sub Industry: DTH
Dish TV
Sub Industry: TV
ZEE Entertainment
Sub Industry: Gym
Talwalkar Better Value Fitness
Sub Industry: Amusement Park
Wonderla Holidays

Monday, July 30, 2018

Python IDE - JetBrains PyCharm


Python IDE - PyCharm By JetBrains

https://www.jetbrains.com/pycharm/

Django Bitnami Stack



Downloaded following Djano Bitnami Stack that includes python, apache, Django, SQLlite and MySQL etc.

https://bitnami.com/stack/django


https://bitnami.com/download/files/stacks/djangostack/2.0.7-0/bitnami-djangostack-2.0.7-0-windows-installer.exe


https://www.djangoproject.com/download/

Friday, July 20, 2018

python debugger



# for morningstar website debugging using dataframe.

$ python -m pdb mstar.py

Thursday, July 19, 2018

Monday, July 16, 2018

gmake



gmake : print rules database (-p)
$ gmake -p <target>

Saturday, May 5, 2018

Python - machine learning : Day 1


Install PIP & ML Packages


Machine Learning Setup:
===================

$ cat ml-setup.sh

sudo curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
sudo python get-pip.py  

# resolve requests error
# pip list | grep request

sudo -H pip install --ignore-installed requests==2.7.0

sudo -H pip install quandl

sudo -H pip install sklearn
sudo -H pip install scipy
$


Box 1:
=====

# sudo sh

# curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py

# python get-pip.py

# pip install quandl

...
Installing collected packages: numpy, more-itertools, pycparser, cffi, enum34, asn1crypto, idna, ipaddress, cryptography, pyOpenSSL, python-dateutil, pandas, ndg-httpsclient, inflection, certifi, chardet, urllib3, requests, quandl

/usr/lib/python2.7/site-packages

Installing collected packages: requests, quandl
  Found existing installation: requests 2.6.0
Cannot uninstall 'requests'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.

# pip list | grep request

# pip install --ignore-installed requests==2.7.0

# pip install quandl
Collecting quandl
  Using cached https://files.pythonhosted.org/packages/47/8c/b61f5c1e9167f4c1c1c2b86991bbbac51a2bd937b36cbc4cc39248dfb2d1/Quandl-3.3.0-py2.py3-none-any.whl
Requirement already satisfied: numpy>=1.8 in /usr/lib64/python2.7/site-packages (from quandl) (1.14.3)
Requirement already satisfied: more-itertools in /usr/lib/python2.7/site-packages (from quandl) (4.1.0)
Requirement already satisfied: pyOpenSSL in /usr/lib/python2.7/site-packages (from quandl) (17.5.0)
Requirement already satisfied: pandas>=0.14 in /usr/lib64/python2.7/site-packages (from quandl) (0.22.0)
Requirement already satisfied: ndg-httpsclient in /usr/lib/python2.7/site-packages (from quandl) (0.5.0)
Requirement already satisfied: inflection>=0.3.1 in /usr/lib/python2.7/site-packages (from quandl) (0.3.1)
Requirement already satisfied: requests>=2.7.0 in /usr/lib/python2.7/site-packages (from quandl) (2.7.0)
Requirement already satisfied: python-dateutil in /usr/lib/python2.7/site-packages (from quandl) (2.7.2)
Requirement already satisfied: six in /usr/lib/python2.7/site-packages (from quandl) (1.11.0)
Requirement already satisfied: pyasn1 in /usr/lib/python2.7/site-packages (from quandl) (0.1.9)
Requirement already satisfied: cryptography>=2.1.4 in /usr/lib64/python2.7/site-packages (from pyOpenSSL->quandl) (2.2.2)
Requirement already satisfied: pytz>=2011k in /usr/lib/python2.7/site-packages (from pandas>=0.14->quandl) (2018.4)
Requirement already satisfied: cffi>=1.7; platform_python_implementation != "PyPy" in /usr/lib64/python2.7/site-packages (from cryptography>=2.1.4->pyOpenSSL->quandl) (1.11.5)
Requirement already satisfied: enum34; python_version < "3" in /usr/lib/python2.7/site-packages (from cryptography>=2.1.4->pyOpenSSL->quandl) (1.1.6)
Requirement already satisfied: asn1crypto>=0.21.0 in /usr/lib/python2.7/site-packages (from cryptography>=2.1.4->pyOpenSSL->quandl) (0.24.0)
Requirement already satisfied: idna>=2.1 in /usr/lib/python2.7/site-packages (from cryptography>=2.1.4->pyOpenSSL->quandl) (2.6)
Requirement already satisfied: ipaddress; python_version < "3" in /usr/lib/python2.7/site-packages (from cryptography>=2.1.4->pyOpenSSL->quandl) (1.0.22)
Requirement already satisfied: pycparser in /usr/lib/python2.7/site-packages (from cffi>=1.7; platform_python_implementation != "PyPy"->cryptography>=2.1.4->pyOpenSSL->quandl) (2.18)
Installing collected packages: quandl
Successfully installed quandl-3.3.0
sh-4.2#

sh-4.2# pip install sklearn
Collecting sklearn
  Downloading https://files.pythonhosted.org/packages/1e/7a/dbb3be0ce9bd5c8b7e3d87328e79063f8b263b2b1bfa4774cb1147bfcd3f/sklearn-0.0.tar.gz
Collecting scikit-learn (from sklearn)
  Downloading https://files.pythonhosted.org/packages/c4/b8/eb447f84e0012b0bce97d12d1bc6ea6882b4ed9eb7faaca00e8f627733fb/scikit_learn-0.19.1-cp27-cp27mu-manylinux1_x86_64.whl (12.2MB)
    100% |████████████████████████████████| 12.2MB 2.8MB/s
Building wheels for collected packages: sklearn
  Running setup.py bdist_wheel for sklearn ... done
  Stored in directory: /root/.cache/pip/wheels/76/03/bb/589d421d27431bcd2c6da284d5f2286c8e3b2ea3cf1594c074
Successfully built sklearn
Installing collected packages: scikit-learn, sklearn
Successfully installed scikit-learn-0.19.1 sklearn-0.0
sh-4.2#





sh-4.2# pip install scipy

Box 2:
=====


sh-4.2# pip install quandl
The directory '/home/surikuma/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/home/surikuma/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Collecting quandl
Could not install packages due to an EnvironmentError: [Errno 13] Permission denied: '/home/surikuma/.cache/pip/wheels/7d/29/b6/60270405bfa9eaca54c2afc87b5501d0afb4906eba07a08bc1'
Consider using the `--user` option or check the permissions.

sh-4.2# exit
exit
$ sudo -H pip install quandl

We trust you have received the usual lecture from the local System
Administrator. It usually boils down to these two things:

        #1) Respect the privacy of others.
        #2) Think before you type.

Password:
Collecting quandl
  Downloading https://files.pythonhosted.org/packages/47/8c/b61f5c1e9167f4c1c1c2b86991bbbac51a2bd937b36cbc4cc39248dfb2d1/Quandl-3.3.0-py2.py3-none-any.whl
Collecting numpy>=1.8 (from quandl)


Installing collected packages: numpy, more-itertools, python-dateutil, pytz, pandas, ndg-httpsclient, inflection, certifi, chardet, idna, urllib3, requests, quandl
  Found existing installation: chardet 2.2.1
    Uninstalling chardet-2.2.1:
      Successfully uninstalled chardet-2.2.1
  Found existing installation: idna 2.4
    Uninstalling idna-2.4:
      Successfully uninstalled idna-2.4
  Found existing installation: urllib3 1.10.2
    Uninstalling urllib3-1.10.2:
      Successfully uninstalled urllib3-1.10.2
  Found existing installation: requests 2.6.0
Cannot uninstall 'requests'. It is a distutils installed project
 and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.



$ sudo -H pip install --ignore-installed requests==2.7.0
Collecting requests==2.7.0
  Using cached https://files.pythonhosted.org/packages/26/ff/c71b3943bebdd9f7ceb9e137296370587eb0b33fe2eb3732ae168bc45204/requests-2.7.0-py2.py3-none-any.whl
rtslib-fb 2.1.63 has requirement pyudev>=0.16.1, but you'll have pyudev 0.15 which is incompatible.
Installing collected packages: requests
Successfully installed requests-2.7.0

$

$ sudo -H pip install quandl
Collecting quandl
  Using cached https://files.pythonhosted.org/packages/47/8c/b61f5c1e9167f4c1c1c2b86991bbbac51a2bd937b36cbc4cc39248dfb2d1/Quandl-3.3.0-py2.py3-none-any.whl
Requirement already satisfied: numpy>=1.8 in /usr/lib64/python2.7/site-packages (from quandl) (1.14.3)
Requirement already satisfied: more-itertools in /usr/lib/python2.7/site
Requirement already satisfied: pytz>=2011k in /usr/lib/python2.7/site-packages (from pandas>=0.14->quandl) (2018.4)
rtslib-fb 2.1.63 has requirement pyudev>=0.16.1, but you'll have pyudev 0.15 which is incompatible.

...

Installing collected packages: quandl
Successfully installed quandl-3.3.0
$

$ sudo -H pip install sklearn

$ sudo -H pip install scipy




[surinder_kumar_432@oracle-db-kafka-instance src]$ python ml-stock.py
/usr/lib64/python2.7/site-packages/sklearn/cross_validation.py:41: DeprecationWarning: This module was deprecated in version 0.18 in favor of the model_selection module into which all the refactored classes and functions are moved. Also note that the interface of the new CV iterators are different from that of this module. This module will be removed in 0.20.
  "This module will be removed in 0.20.", DeprecationWarning)
               Open     High      Low    Close     Volume  Ex-Dividend  \
Date                                                                    
2018-03-21  1586.45  1590.00  1563.17  1581.86  4667291.0          0.0  
2018-03-22  1565.47  1573.85  1542.40  1544.10  6177737.0          0.0  
2018-03-23  1539.01  1549.02  1495.36  1495.56  7843966.0          0.0  
2018-03-26  1530.00  1556.99  1499.25  1555.86  5547618.0          0.0  
2018-03-27  1572.40  1575.96  1482.32  1497.05  6793279.0          0.0  

            Split Ratio  Adj. Open  Adj. High  Adj. Low  Adj. Close  \
Date                                                                 
2018-03-21          1.0    1586.45    1590.00   1563.17     1581.86  
2018-03-22          1.0    1565.47    1573.85   1542.40     1544.10  
2018-03-23          1.0    1539.01    1549.02   1495.36     1495.56  
2018-03-26          1.0    1530.00    1556.99   1499.25     1555.86  
2018-03-27          1.0    1572.40    1575.96   1482.32     1497.05  

            Adj. Volume 
Date                    
2018-03-21    4667291.0 
2018-03-22    6177737.0 
2018-03-23    7843966.0 
2018-03-26    5547618.0 
2018-03-27    6793279.0 
            Adj. Close  Prediction
Date                             
2018-03-21     1581.86         NaN
2018-03-22     1544.10         NaN
2018-03-23     1495.56         NaN
2018-03-26     1555.86         NaN
2018-03-27     1497.05         NaN
('confidence: ', '0.9892798601739748')
[1497.72077245 1536.49472298 1547.85950159 1533.99043937 1554.85239524
 1570.31316314 1572.26565545 1588.43738523 1611.72934512 1601.14980799
 1601.64854243 1581.48693707 1588.70266951 1613.49083275 1628.3785866
 1636.18855584 1643.46795652 1672.150493   1692.84266693 1682.00845688
 1685.00086357 1675.79019333 1664.49969433 1636.11427624 1680.23635788
 1675.30207026 1635.23353243 1583.7259364  1647.71250501 1585.30703072]
[surinder_kumar_432@oracle-db-kafka-instance src]$




[surinder_kumar_432@oracle-db-kafka-instance src]$ cat ml-stock.py
#!/bin/python

import quandl
import pandas as pd
import numpy as np
import datetime

from sklearn.linear_model import LinearRegression
from sklearn import preprocessing, cross_validation, svm

df = quandl.get("WIKI/AMZN")

print 'dataframe'
print(df.tail(60))

df = df[['Adj. Close']]

print 'dataframe : only Adj.close'
print(df.tail(60))

forecast_out = int(30) # predicting 30 days into future

#  label column with data shifted 30 units up
df['Prediction'] = df[['Adj. Close']].shift(-forecast_out)

print 'dataframe : with prediction label'
print(df)

# It should be same as
# drop (index or column, 0-index | 1-column))
# X = np.array(df.drop(['Prediction'], 1))
X = np.array(df[['Adj. Close']])

# print 'X : np array after dropping prediction'
print 'X : np array of Adj. Close'
print X

X = preprocessing.scale(X)

print 'X : after preprocessing scale'
print X

X = X[:-forecast_out] # remove last 30 from X

print 'X : remove last 30 from forecast'
print X

y = np.array(df['Prediction'])

print 'y : np array of dataframe prediction'
print y

y = y[:-forecast_out]

print 'y : remove last 30 days from y for forecst'
print y

print 'splited training and testing : data : cross_validation.train_test_split '
X_train, X_test, y_train, y_test = cross_validation.train_test_split(X, y, test_size = 0.2)

print 'X_train'
print X_train

print 'y_train'
print y_train

print 'X_test'
print X_test

print 'y_test'
print y_test

# Training : clf  - confidence level functionreplaced by model
model = LinearRegression()
model.fit(X_train,y_train)

# Testing
confidence = model.score(X_test, y_test)
print("confidence: ", confidence)

X_forecast = X[-forecast_out:] # set X_forecast equal to last 30

print 'X : forecast to last 30'
print X

forecast_prediction = model.predict(X_forecast)
print(forecast_prediction)

curl https://bootstrap.pypa.io/get-pip.py -o get-pip.pycurl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py