Custom Code

Power(ADANIPORTS:NSE*ASIANPAINT:NSE*AXISBANK:NSE*BAJAJAUTO:NSE*BAJFINANCE:NSE*BAJAJFINSV:NSE*BPCL:NSE*BHARTIARTL:NSE*INFRATEL:NSE*BRITANNIA:NSE*CIPLA:NSE*COALINDIA:NSE*DRREDDY:NSE*EICHERMOT:NSE*GAIL:NSE*GRASIM:NSE*HCLTECH:NSE*HDFCBANK:NSE*HDFCLIFE:NSE*HEROMOTOCO:NSE*HINDALCO:NSE*HINDUNILVR:NSE*HDFC:NSE*ICICIBANK:NSE*ITC:NSE*IOC:NSE*INDUSINDBK:NSE*INFY:NSE*JSWSTEEL:NSE*KOTAKBANK:NSE*LT:NSE*M&M:NSE*MARUTI:NSE*NTPC:NSE*NESTLEIND:NSE*ONGC:NSE*POWERGRID:NSE*RELIANCE:NSE*SHREECEM:NSE*SBIN:NSE*SUNPHARMA:NSE*TCS:NSE*TATAMOTORS:NSE*TATASTEEL:NSE*TECHM:NSE*TITAN:NSE*UPL:NSE*ULTRACEMCO:NSE*WIPRO:NSE*ZEEL:NSE,power=0.20)

Hiii Does custom code have any limitation. Using above formula to create index is not working.

Hi Deepak,

Not sure, but it would not surprise me. When you add this as a script, the calculation has to be performed every time the script is used and every time that page is activated. It is very “expensive”.

Using the Breadth Module is a much better way to do this. The Breadth engine has a “Geometric Average” option in 1.6 which should do what you are after. The beauty with this is that the calculation is done once when new data is received, and then after that, it is just like any other data file.

The other benefit is that it builds in anti-Survivorship by not changing the historical values when you change the tickers. (Use a Manual Symbol List for the tickers).

See this page for more information on Breadth https://help.optuma.com/kb/faq.php?id=644

This page for Manual Symbol Lists https://help.optuma.com/kb/faq.php?id=1196

All the best

Mathew