wiz-trader 0.37.0__py3-none-any.whl → 0.39.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: wiz_trader
3
- Version: 0.37.0
3
+ Version: 0.39.0
4
4
  Summary: A Python SDK for connecting to the Wizzer.
5
5
  Home-page: https://bitbucket.org/wizzer-tech/quotes_sdk.git
6
6
  Author: Pawan Wagh
@@ -50,6 +50,7 @@ Dynamic: requires-python
50
50
  - [Basket Management](#basket-management)
51
51
  - [Instrument Management](#instrument-management)
52
52
  - [Instrument Screener](#instrument-screener)
53
+ - [Analytics API](#analytics-api)
53
54
  - [Complete Examples](#wizzer-client-examples)
54
55
  6. [Common Use Cases](#common-use-cases)
55
56
  7. [Error Handling](#error-handling)
@@ -2327,6 +2328,528 @@ The `contract` field indicates the type of futures contract:
2327
2328
  - **`mid_month`**: Next month's futures contract
2328
2329
  - **`far_month`**: Month after next futures contract
2329
2330
 
2331
+ ### Analytics API
2332
+
2333
+ The Analytics API provides comprehensive financial analysis and market data tools for stocks and indices. It includes fundamentals analysis, valuation metrics, returns calculation, market data, ownership analysis, metrics, and macro data.
2334
+
2335
+ #### Fundamentals Analysis
2336
+
2337
+ Get key financial metrics and ratios for stocks:
2338
+
2339
+ ```python
2340
+ # Net Profit Margin
2341
+ margin = client.get_net_profit_margin("INFY", period="quarterly", quarter="Q1FY24")
2342
+ print(f"Net Profit Margin: {margin['netProfitMargin']}%")
2343
+
2344
+ # Return on Equity (ROE)
2345
+ roe = client.get_roe("TCS", period="annual", consolidated=True)
2346
+ print(f"ROE: {roe['roe']}%")
2347
+
2348
+ # Return on Assets (ROA)
2349
+ roa = client.get_roa("WIPRO", period="annual", consolidated=True)
2350
+ print(f"ROA: {roa['roa']}%")
2351
+
2352
+ # EBIT Margin
2353
+ ebit = client.get_ebit_margin("INFY", period="annual", consolidated=True)
2354
+ print(f"EBIT Margin: {ebit['ebitMargin']}%")
2355
+
2356
+ # Operating Cash Flow to Net Profit Ratio
2357
+ ocf_ratio = client.get_ocf_netprofit_ratio("TCS", period="annual")
2358
+ print(f"OCF/Net Profit Ratio: {ocf_ratio['ocfNetprofitRatio']}")
2359
+
2360
+ # EPS CAGR (Compound Annual Growth Rate)
2361
+ eps_cagr = client.get_eps_cagr("INFY", start_year=2019, end_year=2023)
2362
+ print(f"EPS CAGR (2019-2023): {eps_cagr['epsCagr']}%")
2363
+
2364
+ # Book to Market Ratio
2365
+ btm = client.get_book_to_market("NSE:INFY", as_of="2024-03-31")
2366
+ print(f"Book to Market: {btm['bookToMarket']}")
2367
+
2368
+ # Market Cap to Sales Ratio
2369
+ mts = client.get_marketcap_to_sales("RELIANCE", as_of="2024-03-31")
2370
+ print(f"Market Cap to Sales: {mts['marketcapToSales']}")
2371
+
2372
+ # Cash to Market Cap Ratio
2373
+ ctm = client.get_cash_to_marketcap("TCS", as_of="2024-03-31")
2374
+ print(f"Cash to Market Cap: {ctm['cashToMarketcap']}")
2375
+ ```
2376
+
2377
+ #### Valuation Metrics
2378
+
2379
+ Get key valuation ratios:
2380
+
2381
+ ```python
2382
+ # Price to Earnings (P/E) Ratio
2383
+ pe = client.get_pe_ratio("RELIANCE", date="2024-12-31", ttm=False, consolidated=True)
2384
+ print(f"P/E Ratio: {pe['peRatio']}")
2385
+
2386
+ # Price to Book (P/B) Ratio
2387
+ pb = client.get_pb_ratio("HDFC", date="2024-12-31", consolidated=True)
2388
+ print(f"P/B Ratio: {pb['pbRatio']}")
2389
+
2390
+ # Enterprise Value to EBITDA
2391
+ ev_ebitda = client.get_ev_ebitda("TCS", date="2024-06-30", ttm=False, consolidated=True)
2392
+ print(f"EV/EBITDA: {ev_ebitda['evEbitda']}")
2393
+
2394
+ # Free Cash Flow Yield
2395
+ fcf_yield = client.get_fcf_yield("HDFCAMC", date="2024-06-30", ttm=False, consolidated=True)
2396
+ print(f"FCF Yield: {fcf_yield['fcfYield']}%")
2397
+ ```
2398
+
2399
+ #### Returns Analysis
2400
+
2401
+ Calculate returns over different time periods:
2402
+
2403
+ ```python
2404
+ # CAGR (Compound Annual Growth Rate)
2405
+ cagr_data = client.get_cagr(
2406
+ symbol="RELIANCE",
2407
+ start_date="2020-01-01",
2408
+ end_date="2024-01-01",
2409
+ adjusted=True
2410
+ )
2411
+ print(f"Annual CAGR: {cagr_data['cagr']}%")
2412
+ print(f"Start Price: ₹{cagr_data['startPrice']}")
2413
+ print(f"End Price: ₹{cagr_data['endPrice']}")
2414
+
2415
+ # Quarterly Returns
2416
+ quarterly_returns = client.get_quarterly_returns(
2417
+ symbol="INFY",
2418
+ start_date="2024-01-01",
2419
+ end_date="2024-12-31",
2420
+ adjusted=True
2421
+ )
2422
+
2423
+ # Monthly Returns
2424
+ monthly_returns = client.get_monthly_returns(
2425
+ symbol="TCS",
2426
+ start_date="2024-01-01",
2427
+ end_date="2024-12-31",
2428
+ adjusted=True
2429
+ )
2430
+ ```
2431
+
2432
+ #### Market Data
2433
+
2434
+ Get historical price data and market capitalization:
2435
+
2436
+ ```python
2437
+ # Daily OHLCV Data
2438
+ ohlcv_data = client.get_analytics_ohlcv_daily(
2439
+ symbol="RELIANCE",
2440
+ start_date="2024-01-01",
2441
+ end_date="2024-01-31",
2442
+ adjusted=True
2443
+ )
2444
+ print(f"Retrieved {len(ohlcv_data['data'])} days of data")
2445
+
2446
+ # Historical Prices (same as OHLCV)
2447
+ historical_prices = client.get_analytics_historical_prices(
2448
+ symbol="SBIN",
2449
+ start_date="2024-01-01",
2450
+ end_date="2024-01-31",
2451
+ adjusted=True
2452
+ )
2453
+
2454
+ # Free-Float Market Capitalization
2455
+ free_float_mcap = client.get_free_float_market_cap("RELIANCE", date="2024-07-31")
2456
+ print(f"Free-Float Market Cap: ₹{free_float_mcap['freeFloatMarketCap']} Crores")
2457
+ print(f"Total Market Cap: ₹{free_float_mcap['marketCap']} Crores")
2458
+ print(f"Promoter Holding: {free_float_mcap['promoterHoldingPercent']}%")
2459
+
2460
+ # Index OHLC Daily Data
2461
+ index_data = client.get_index_ohlc_daily(
2462
+ symbol="NIFTY50",
2463
+ start_date="2024-01-01",
2464
+ end_date="2024-01-31"
2465
+ )
2466
+ print(f"Retrieved {len(index_data['data'])} days of index data")
2467
+ ```
2468
+
2469
+ #### Ownership Analysis
2470
+
2471
+ Analyze institutional holdings and their changes:
2472
+
2473
+ ```python
2474
+ # FII and DII Holdings
2475
+ fii_dii = client.get_fii_dii_holdings("RELIANCE", quarter="Q4FY23")
2476
+ print(f"FII Holdings: {fii_dii['fiiPercent']}%")
2477
+ print(f"DII Holdings: {fii_dii['diiPercent']}%")
2478
+
2479
+ # FII Change from Previous Quarter
2480
+ fii_change = client.get_fii_change("INFY")
2481
+ print(f"FII Change: {fii_change['fiiChange']}%")
2482
+ print(f"Current FII: {fii_change['currentFii']}%")
2483
+ print(f"Previous FII: {fii_change['previousFii']}%")
2484
+
2485
+ # DII Change from Previous Quarter
2486
+ dii_change = client.get_dii_change("INFY")
2487
+ print(f"DII Change: {dii_change['diiChange']}%")
2488
+ print(f"Current DII: {dii_change['currentDii']}%")
2489
+ print(f"Previous DII: {dii_change['previousDii']}%")
2490
+ ```
2491
+
2492
+ #### Metrics (Risk-Adjusted Performance)
2493
+
2494
+ Get risk-adjusted performance metrics:
2495
+
2496
+ ```python
2497
+ # Sortino Ratio
2498
+ sortino = client.get_sortino_ratio(
2499
+ symbol="HDFCBANK",
2500
+ start_date="2024-01-01",
2501
+ end_date="2024-12-31",
2502
+ rf=0.065,
2503
+ interval="daily"
2504
+ )
2505
+ print(f"Sortino Ratio: {sortino['sortinoRatio']}")
2506
+ print(f"Annualized Return: {sortino['annualizedReturn']}")
2507
+ print(f"Downside Deviation: {sortino['downsideDeviation']}")
2508
+
2509
+ # Upside Capture Ratio
2510
+ upside_capture = client.get_upside_capture(
2511
+ symbol="ICICIBANK",
2512
+ benchmark_symbol="NIFTY50",
2513
+ start_date="2024-01-01",
2514
+ end_date="2024-12-31"
2515
+ )
2516
+ print(f"Upside Capture Ratio: {upside_capture['upsideCaptureRatio']}%")
2517
+ print(f"Periods Analyzed: {upside_capture['periodsAnalyzed']}")
2518
+ ```
2519
+
2520
+ #### Macro Economic Data
2521
+
2522
+ Get macroeconomic indicators:
2523
+
2524
+ ```python
2525
+ # Risk-Free Rate
2526
+ risk_free_rate = client.get_risk_free_rate(
2527
+ start_date="2024-01-01",
2528
+ end_date="2024-12-31",
2529
+ tenor="10Y",
2530
+ country="IN",
2531
+ method="average"
2532
+ )
2533
+ print(f"Risk-Free Rate (10Y): {risk_free_rate['riskFreeRate']}")
2534
+ print(f"Country: {risk_free_rate['country']}")
2535
+ print(f"Source: {risk_free_rate['source']}")
2536
+ ```
2537
+
2538
+ #### Risk Analysis
2539
+
2540
+ Get risk metrics and volatility measures:
2541
+
2542
+ ```python
2543
+ # Maximum Drawdown (Peak-to-trough decline)
2544
+ max_drawdown = client.get_max_drawdown(
2545
+ symbol="RELIANCE",
2546
+ start_date="2024-01-01",
2547
+ end_date="2024-12-31"
2548
+ )
2549
+ print(f"Maximum Drawdown: {max_drawdown['maxDrawdown']}%")
2550
+ print(f"Drawdown Start Date: {max_drawdown['drawdownStartDate']}")
2551
+ print(f"Drawdown End Date: {max_drawdown['drawdownEndDate']}")
2552
+ print(f"Days in Drawdown: {max_drawdown['daysInDrawdown']}")
2553
+
2554
+ # Returns Volatility (Standard Deviation)
2555
+ volatility = client.get_returns_volatility(
2556
+ symbol="NIFTY50",
2557
+ start_date="2024-01-01",
2558
+ end_date="2024-12-31",
2559
+ interval="daily"
2560
+ )
2561
+ print(f"Volatility (Daily): {volatility['volatility']}%")
2562
+ print(f"Annualized Volatility: {volatility['annualizedVolatility']}%")
2563
+ print(f"Mean Return: {volatility['meanReturn']}%")
2564
+ ```
2565
+
2566
+ #### Sector Classification
2567
+
2568
+ Get comprehensive sector and industry classification:
2569
+
2570
+ ```python
2571
+ # Complete Sector Classification Data
2572
+ sector_data = client.get_sector_classification("RELIANCE")
2573
+ print(f"Company: {sector_data['companyName']}")
2574
+ print(f"Sector: {sector_data['sector']}")
2575
+ print(f"Industry: {sector_data['industry']}")
2576
+ print(f"Sub-Industry: {sector_data['subIndustry']}")
2577
+ print(f"GICS Sector Code: {sector_data['gicsSectorCode']}")
2578
+ print(f"Industry Group: {sector_data['industryGroup']}")
2579
+ print(f"Market Cap Tier: {sector_data['marketCapTier']}")
2580
+ ```
2581
+
2582
+ #### Leverage Analysis
2583
+
2584
+ Analyze financial leverage and debt ratios:
2585
+
2586
+ ```python
2587
+ # Debt-to-Equity Ratio
2588
+ debt_equity = client.get_debt_equity_ratio(
2589
+ symbol="RELIANCE",
2590
+ period="annual",
2591
+ consolidated=True
2592
+ )
2593
+ print(f"Debt-to-Equity Ratio: {debt_equity['debtEquityRatio']}")
2594
+ print(f"Total Debt: ₹{debt_equity['totalDebt']} Crores")
2595
+ print(f"Total Equity: ₹{debt_equity['totalEquity']} Crores")
2596
+ print(f"Period: {debt_equity['period']}")
2597
+ print(f"Data Date: {debt_equity['dataDate']}")
2598
+ ```
2599
+
2600
+ #### Advanced Returns Analysis
2601
+
2602
+ Calculate compound annual growth rates:
2603
+
2604
+ ```python
2605
+ # CAGR (Compound Annual Growth Rate)
2606
+ cagr = client.get_cagr(
2607
+ symbol="TCS",
2608
+ start_date="2020-01-01",
2609
+ end_date="2024-01-01",
2610
+ adjusted=True
2611
+ )
2612
+ print(f"CAGR (4-Year): {cagr['cagr']}%")
2613
+ print(f"Total Return: {cagr['totalReturn']}%")
2614
+ print(f"Start Price: ₹{cagr['startPrice']}")
2615
+ print(f"End Price: ₹{cagr['endPrice']}")
2616
+ print(f"Years: {cagr['years']}")
2617
+ ```
2618
+
2619
+ #### Complete Analytics Example
2620
+
2621
+ Here's a comprehensive example that combines multiple analytics features:
2622
+
2623
+ ```python
2624
+ from wiz_trader import WizzerClient
2625
+
2626
+ def analyze_stock(symbol):
2627
+ client = WizzerClient(
2628
+ base_url="https://api-url.in",
2629
+ token="your-jwt-token"
2630
+ )
2631
+
2632
+ print(f"=== Analysis for {symbol} ===\n")
2633
+
2634
+ # Fundamentals
2635
+ print("[FUNDAMENTALS]:")
2636
+ try:
2637
+ margin = client.get_net_profit_margin(symbol)
2638
+ print(f" Net Profit Margin: {margin.get('netProfitMargin', 'N/A')}%")
2639
+
2640
+ roe = client.get_roe(symbol)
2641
+ print(f" ROE: {roe.get('roe', 'N/A')}%")
2642
+
2643
+ roa = client.get_roa(symbol)
2644
+ print(f" ROA: {roa.get('roa', 'N/A')}%")
2645
+
2646
+ eps_cagr = client.get_eps_cagr(symbol, start_year=2019, end_year=2023)
2647
+ print(f" EPS CAGR (5Y): {eps_cagr.get('epsCagr', 'N/A')}%")
2648
+ except Exception as e:
2649
+ print(f" Error fetching fundamentals: {e}")
2650
+
2651
+ # Valuation
2652
+ print("\n[VALUATION]:")
2653
+ try:
2654
+ pe = client.get_pe_ratio(symbol)
2655
+ print(f" P/E Ratio: {pe.get('peRatio', 'N/A')}")
2656
+
2657
+ pb = client.get_pb_ratio(symbol)
2658
+ print(f" P/B Ratio: {pb.get('pbRatio', 'N/A')}")
2659
+
2660
+ ev_ebitda = client.get_ev_ebitda(symbol)
2661
+ print(f" EV/EBITDA: {ev_ebitda.get('evEbitda', 'N/A')}")
2662
+ except Exception as e:
2663
+ print(f" Error fetching valuation: {e}")
2664
+
2665
+ # Returns
2666
+ print("\n📈 RETURNS:")
2667
+ try:
2668
+ cagr_data = client.get_cagr(
2669
+ symbol=symbol,
2670
+ start_date="2020-01-01",
2671
+ end_date="2024-01-01"
2672
+ )
2673
+ print(f" 4-Year CAGR: {cagr_data.get('cagr', 'N/A')}%")
2674
+ print(f" Start Price: ₹{cagr_data.get('startPrice', 'N/A')}")
2675
+ print(f" End Price: ₹{cagr_data.get('endPrice', 'N/A')}")
2676
+ except Exception as e:
2677
+ print(f" Error fetching returns: {e}")
2678
+
2679
+ # Ownership
2680
+ print("\n[OWNERSHIP]:")
2681
+ try:
2682
+ fii_dii = client.get_fii_dii_holdings(symbol)
2683
+ print(f" FII Holdings: {fii_dii.get('fiiPercent', 'N/A')}%")
2684
+ print(f" DII Holdings: {fii_dii.get('diiPercent', 'N/A')}%")
2685
+
2686
+ fii_change = client.get_fii_change(symbol)
2687
+ print(f" FII Change: {fii_change.get('fiiChange', 'N/A')}%")
2688
+ except Exception as e:
2689
+ print(f" Error fetching ownership: {e}")
2690
+
2691
+ # Market Cap
2692
+ print("\n[MARKET DATA]:")
2693
+ try:
2694
+ mcap = client.get_free_float_market_cap(symbol)
2695
+ print(f" Market Cap: ₹{mcap.get('marketCap', 'N/A')} Crores")
2696
+ print(f" Free-Float Market Cap: ₹{mcap.get('freeFloatMarketCap', 'N/A')} Crores")
2697
+ print(f" Promoter Holding: {mcap.get('promoterHoldingPercent', 'N/A')}%")
2698
+ except Exception as e:
2699
+ print(f" Error fetching market data: {e}")
2700
+
2701
+ # Risk Analysis
2702
+ print("\n[RISK ANALYSIS]:")
2703
+ try:
2704
+ max_drawdown = client.get_max_drawdown(
2705
+ symbol=symbol,
2706
+ start_date="2024-01-01",
2707
+ end_date="2024-12-31"
2708
+ )
2709
+ print(f" Maximum Drawdown: {max_drawdown.get('maxDrawdown', 'N/A')}%")
2710
+
2711
+ volatility = client.get_returns_volatility(
2712
+ symbol=symbol,
2713
+ start_date="2024-01-01",
2714
+ end_date="2024-12-31"
2715
+ )
2716
+ print(f" Returns Volatility: {volatility.get('volatility', 'N/A')}%")
2717
+ except Exception as e:
2718
+ print(f" Error fetching risk metrics: {e}")
2719
+
2720
+ # Sector Classification
2721
+ print("\n[SECTOR CLASSIFICATION]:")
2722
+ try:
2723
+ sector = client.get_sector_classification(symbol)
2724
+ print(f" Sector: {sector.get('sector', 'N/A')}")
2725
+ print(f" Industry: {sector.get('industry', 'N/A')}")
2726
+ print(f" Market Cap Tier: {sector.get('marketCapTier', 'N/A')}")
2727
+ except Exception as e:
2728
+ print(f" Error fetching sector data: {e}")
2729
+
2730
+ # Leverage Analysis
2731
+ print("\n[LEVERAGE ANALYSIS]:")
2732
+ try:
2733
+ debt_equity = client.get_debt_equity_ratio(symbol)
2734
+ print(f" Debt-to-Equity Ratio: {debt_equity.get('debtEquityRatio', 'N/A')}")
2735
+ except Exception as e:
2736
+ print(f" Error fetching leverage metrics: {e}")
2737
+
2738
+ # Analyze multiple stocks
2739
+ stocks = ["RELIANCE", "TCS", "INFY", "HDFC", "SBIN"]
2740
+ for stock in stocks:
2741
+ analyze_stock(stock)
2742
+ print("\n" + "="*50 + "\n")
2743
+ ```
2744
+
2745
+ #### Advanced Market Data Analysis
2746
+
2747
+ Advanced volume and drawdown analysis:
2748
+
2749
+ ```python
2750
+ # Average Traded Volume
2751
+ volume_data = client.get_average_traded_volume(
2752
+ symbol="HDFCBANK",
2753
+ start_date="2024-04-01",
2754
+ end_date="2024-06-30",
2755
+ interval="daily"
2756
+ )
2757
+ print(f"Average Volume: {volume_data['averageVolume']} shares")
2758
+
2759
+ # Index Maximum Drawdown
2760
+ index_drawdown = client.get_index_max_drawdown(
2761
+ index_symbol="NIFTY50",
2762
+ start_date="2023-01-01",
2763
+ end_date="2024-01-01",
2764
+ interval="daily"
2765
+ )
2766
+ print(f"Max Drawdown: {index_drawdown['maxDrawdown']}%")
2767
+
2768
+ # Drawdown Duration Analysis
2769
+ drawdown_duration = client.get_drawdown_duration(
2770
+ symbol="INFY",
2771
+ start_date="2022-01-01",
2772
+ end_date="2024-01-01",
2773
+ interval="daily"
2774
+ )
2775
+ print(f"Max Drawdown Duration: {drawdown_duration['maxDrawdownDuration']} days")
2776
+ ```
2777
+
2778
+ #### Technical Price Analysis
2779
+
2780
+ Rolling price analysis and volatility:
2781
+
2782
+ ```python
2783
+ # Rolling Peak Price Analysis
2784
+ rolling_peak = client.get_rolling_peak_price(
2785
+ symbol="NSE:TCS",
2786
+ start_date="2024-01-01",
2787
+ end_date="2024-06-30",
2788
+ window=20,
2789
+ adjusted=True
2790
+ )
2791
+ print(f"Rolling peak data points: {len(rolling_peak['data'])}")
2792
+
2793
+ # Rolling Price Mean
2794
+ rolling_mean = client.get_rolling_price_mean(
2795
+ symbol="HDFCBANK",
2796
+ start_date="2024-01-01",
2797
+ end_date="2024-06-30",
2798
+ window=50,
2799
+ adjusted=True
2800
+ )
2801
+ print(f"Rolling mean data points: {len(rolling_mean['data'])}")
2802
+
2803
+ # Realized Volatility
2804
+ volatility = client.get_realized_volatility(
2805
+ symbol="NSE:ITC",
2806
+ start_date="2024-01-01",
2807
+ end_date="2024-06-30",
2808
+ adjusted=True
2809
+ )
2810
+ print(f"Realized Volatility: {volatility['realizedVolatility']}%")
2811
+ print(f"Annualized Volatility: {volatility['annualizedVolatility']}%")
2812
+ ```
2813
+
2814
+ #### Advanced Risk Metrics
2815
+
2816
+ CAMP Beta analysis:
2817
+
2818
+ ```python
2819
+ # 90-Day Beta Analysis
2820
+ beta_90d = client.get_beta_90d(
2821
+ symbol="ITC",
2822
+ benchmark="NIFTY50"
2823
+ )
2824
+ print(f"90-Day Beta: {beta_90d['beta']}")
2825
+ print(f"Correlation: {beta_90d['correlation']}")
2826
+ print(f"R-Squared: {beta_90d['rSquared']}")
2827
+
2828
+ # Custom Period Beta
2829
+ beta_custom = client.get_beta_custom_period(
2830
+ symbol="TCS",
2831
+ benchmark="NIFTY50",
2832
+ start_date="2020-01-01",
2833
+ end_date="2024-12-31"
2834
+ )
2835
+ print(f"Custom Period Beta: {beta_custom['beta']}")
2836
+ print(f"Alpha: {beta_custom['alpha']}")
2837
+ ```
2838
+
2839
+ **Key Features:**
2840
+ - **Comprehensive Coverage**: 39+ analytics endpoints covering fundamentals, valuation, returns, market data, ownership, metrics, macro data, risk analysis, sector classification, leverage analysis, and advanced technical analysis
2841
+ - **Fundamentals Analysis**: 9 methods including ROE, ROA, margins, ratios, book-to-market, market cap-to-sales, and cash-to-market cap
2842
+ - **Valuation Metrics**: P/E, P/B, EV/EBITDA, FCF yield with TTM and consolidated/standalone options
2843
+ - **Risk-Adjusted Metrics**: Sortino ratio, upside capture ratio, maximum drawdown, and returns volatility for comprehensive risk analysis
2844
+ - **Sector & Industry Analysis**: Complete GICS classification with sector, industry, sub-industry, and market cap tier data
2845
+ - **Leverage Analysis**: Debt-to-equity ratios and comprehensive financial leverage metrics
2846
+ - **Institutional Analysis**: Track FII/DII holdings and their quarterly changes
2847
+ - **Returns Calculation**: Calculate CAGR over custom time periods with flexible date ranges
2848
+ - **Macro Economic Data**: Risk-free rates for various tenors and countries
2849
+ - **Index Support**: Historical OHLC data for major indices like NIFTY50, SENSEX
2850
+ - **Error Handling**: Robust error handling with comprehensive parameter validation
2851
+ - **Modern API Design**: Updated parameter names following camelCase convention
2852
+
2330
2853
  ### Wizzer Client Examples
2331
2854
 
2332
2855
  #### Market Data and Analysis Example
@@ -3628,24 +4151,6 @@ All supported environment variables:
3628
4151
 
3629
4152
  ## Available Screener Fields
3630
4153
 
3631
- ### Historical Market Data
3632
-
3633
- | Field | Description | Data Type | Unit | Supported Operations |
3634
- |--- |--- |--- |--- |--- |
3635
- | `hmdOpen` | Opening price of the trading session | Float | currency | `$eq`, `$ne`, `$gt`, `$gte`, `$lt`, `$lte`, `$between` |
3636
- | `hmdHigh` | Highest price during the trading session | Float | currency | `$eq`, `$ne`, `$gt`, `$gte`, `$lt`, `$lte`, `$between` |
3637
- | `hmdLow` | Lowest price during the trading session | Float | currency | `$eq`, `$ne`, `$gt`, `$gte`, `$lt`, `$lte`, `$between` |
3638
- | `hmdClose` | Closing price of the trading session | Float | currency | `$eq`, `$ne`, `$gt`, `$gte`, `$lt`, `$lte`, `$between` |
3639
- | `hmdLtp` | Last Traded Price | Float | currency | `$eq`, `$ne`, `$gt`, `$gte`, `$lt`, `$lte`, `$between` |
3640
- | `hmdPrevClose` | Previous day closing price | Float | currency | `$eq`, `$ne`, `$gt`, `$gte`, `$lt`, `$lte`, `$between` |
3641
- | `hmdVolume` | Trading volume (number of shares traded) | UInt64 | shares | `$eq`, `$ne`, `$gt`, `$gte`, `$lt`, `$lte`, `$between` |
3642
- | `hmdTurnover` | Trading turnover (total value of shares traded) | Float | currency | `$eq`, `$ne`, `$gt`, `$gte`, `$lt`, `$lte`, `$between` |
3643
- | `hmdTotalTrades` | Total number of trades executed | UInt64 | count | `$eq`, `$ne`, `$gt`, `$gte`, `$lt`, `$lte`, `$between` |
3644
- | `hmdPriceBandLower` | Lower price band limit | Float | currency | `$eq`, `$ne`, `$gt`, `$gte`, `$lt`, `$lte`, `$between` |
3645
- | `hmdPriceBandUpper` | Upper price band limit | Float | currency | `$eq`, `$ne`, `$gt`, `$gte`, `$lt`, `$lte`, `$between` |
3646
- | `hmdDate` | Trading date | Date | - | `$eq`, `$ne`, `$gt`, `$gte`, `$lt`, `$lte`, `$between` |
3647
- | `MarketCap` | Logarithm of Market Capitalization | Float64 | log_currency | `$eq`, `$ne`, `$gt`, `$gte`, `$lt`, `$lte`, `$between` |
3648
-
3649
4154
  ### Instrument Properties
3650
4155
 
3651
4156
  | Field | Description | Data Type | Supported Operations |
@@ -3689,6 +4194,7 @@ All supported environment variables:
3689
4194
  | `grossNpaRatioAnnual` | Gross NPA Ratio - annual | Float64 | % | `$eq`, `$ne`, `$gt`, `$gte`, `$lt`, `$lte`, `$between` |
3690
4195
  | `netNpaRatioQuarterly` | Net NPA Ratio - quarterly | Float64 | % | `$eq`, `$ne`, `$gt`, `$gte`, `$lt`, `$lte`, `$between` |
3691
4196
  | `netNpaRatioAnnual` | Net NPA Ratio - annual | Float64 | % | `$eq`, `$ne`, `$gt`, `$gte`, `$lt`, `$lte`, `$between` |
4197
+ | `gnpaPct` | Gross Non-Performing Assets Percentage | Float | % | `$eq`, `$ne`, `$gt`, `$gte`, `$lt`, `$lte`, `$between` |
3692
4198
 
3693
4199
  ### Capital Adequacy
3694
4200
  | Field | Description | Data Type | Unit | Supported Operations |
@@ -3745,6 +4251,8 @@ All supported environment variables:
3745
4251
  ### Total Assets & Equity
3746
4252
  | Field | Description | Data Type | Unit | Supported Operations |
3747
4253
  |--- |--- |--- |--- |--- |
4254
+ | `bookValue` | Book Value | Nullable(Float64) | currency | `$eq`, `$ne`, `$gt`, `$gte`, `$lt`, `$lte`, `$between` |
4255
+ | `shareholderEquity` | Shareholder Equity | Nullable(Float64) | currency | `$eq`, `$ne`, `$gt`, `$gte`, `$lt`, `$lte`, `$between` |
3748
4256
  | `totalAssetsQuarterly` | Total Assets - quarterly | Float64 | currency | `$eq`, `$ne`, `$gt`, `$gte`, `$lt`, `$lte`, `$between` |
3749
4257
  | `totalAssetsAnnual` | Total Assets - annual | Float64 | currency | `$eq`, `$ne`, `$gt`, `$gte`, `$lt`, `$lte`, `$between` |
3750
4258
  | `totalEquityQuarterly` | Total Equity - quarterly | Float64 | currency | `$eq`, `$ne`, `$gt`, `$gte`, `$lt`, `$lte`, `$between` |
@@ -3754,11 +4262,18 @@ All supported environment variables:
3754
4262
  | `totalLiabilitiesQuarterly` | Total Liabilities - quarterly | Float64 | currency | `$eq`, `$ne`, `$gt`, `$gte`, `$lt`, `$lte`, `$between` |
3755
4263
  | `totalLiabilitiesAnnual` | Total Liabilities - annual | Float64 | currency | `$eq`, `$ne`, `$gt`, `$gte`, `$lt`, `$lte`, `$between` |
3756
4264
 
4265
+ ### Debt & Cash
4266
+ | Field | Description | Data Type | Unit | Supported Operations |
4267
+ |--- |--- |--- |--- |--- |
4268
+ | `totalDebt` | Total Debt | Float64 | currency | `$eq`, `$ne`, `$gt`, `$gte`, `$lt`, `$lte`, `$between` |
4269
+ | `netCash` | Net Cash (Cash - Total Debt) | Float64 | currency | `$eq`, `$ne`, `$gt`, `$gte`, `$lt`, `$lte`, `$between` |
4270
+
3757
4271
  ## Income Statement Items
3758
4272
 
3759
4273
  ### Revenue & Income
3760
4274
  | Field | Description | Data Type | Unit | Supported Operations |
3761
4275
  |--- |--- |--- |--- |--- |
4276
+ | `revenue` | Total Revenue | Nullable(Float64) | currency | `$eq`, `$ne`, `$gt`, `$gte`, `$lt`, `$lte`, `$between` |
3762
4277
  | `revenueOperationsQuarterly` | Revenue from Operations - quarterly | Float64 | currency | `$eq`, `$ne`, `$gt`, `$gte`, `$lt`, `$lte`, `$between` |
3763
4278
  | `revenueOperationsAnnual` | Revenue from Operations - annual | Float64 | currency | `$eq`, `$ne`, `$gt`, `$gte`, `$lt`, `$lte`, `$between` |
3764
4279
  | `otherIncomeQuarterly` | Other Income - quarterly | Float64 | currency | `$eq`, `$ne`, `$gt`, `$gte`, `$lt`, `$lte`, `$between` |
@@ -3795,6 +4310,7 @@ All supported environment variables:
3795
4310
  | `deferredTaxAnnual` | Deferred Tax - annual | Float64 | currency | `$eq`, `$ne`, `$gt`, `$gte`, `$lt`, `$lte`, `$between` |
3796
4311
  | `taxExpenseQuarterly` | Tax Expense - quarterly | Float64 | currency | `$eq`, `$ne`, `$gt`, `$gte`, `$lt`, `$lte`, `$between` |
3797
4312
  | `taxExpenseAnnual` | Tax Expense - annual | Float64 | currency | `$eq`, `$ne`, `$gt`, `$gte`, `$lt`, `$lte`, `$between` |
4313
+ | `netIncome` | Net Income | Nullable(Float64) | currency | `$eq`, `$ne`, `$gt`, `$gte`, `$lt`, `$lte`, `$between` |
3798
4314
  | `netProfitQuarterly` | Net Profit - quarterly | Float64 | currency | `$eq`, `$ne`, `$gt`, `$gte`, `$lt`, `$lte`, `$between` |
3799
4315
  | `netProfitAnnual` | Net Profit - annual | Float64 | currency | `$eq`, `$ne`, `$gt`, `$gte`, `$lt`, `$lte`, `$between` |
3800
4316
 
@@ -3841,6 +4357,7 @@ All supported environment variables:
3841
4357
  ### Net Cash Changes
3842
4358
  | Field | Description | Data Type | Unit | Supported Operations |
3843
4359
  |--- |--- |--- |--- |--- |
4360
+ | `freeCashFlow` | Free Cash Flow | Nullable(Float64) | currency | `$eq`, `$ne`, `$gt`, `$gte`, `$lt`, `$lte`, `$between` |
3844
4361
  | `netCashChangeQuarterly` | Net Cash Change - quarterly | Float64 | currency | `$eq`, `$ne`, `$gt`, `$gte`, `$lt`, `$lte`, `$between` |
3845
4362
  | `netCashChangeAnnual` | Net Cash Change - annual | Float64 | currency | `$eq`, `$ne`, `$gt`, `$gte`, `$lt`, `$lte`, `$between` |
3846
4363
  | `cashCashflowStmtQuarterly` | Cash from Cashflow Statement - quarterly | Float64 | currency | `$eq`, `$ne`, `$gt`, `$gte`, `$lt`, `$lte`, `$between` |
@@ -3908,6 +4425,14 @@ All supported environment variables:
3908
4425
  | `interestCoverageRatioQuarterly` | Interest Coverage Ratio - quarterly | Float64 | ratio | `$eq`, `$ne`, `$gt`, `$gte`, `$lt`, `$lte`, `$between` |
3909
4426
  | `interestCoverageRatioAnnual` | Interest Coverage Ratio - annual | Float64 | ratio | `$eq`, `$ne`, `$gt`, `$gte`, `$lt`, `$lte`, `$between` |
3910
4427
 
4428
+ ### Valuation Ratios
4429
+ | Field | Description | Data Type | Unit | Supported Operations |
4430
+ |--- |--- |--- |--- |--- |
4431
+ | `peRatio` | Price to Earnings Ratio | Float | ratio | `$eq`, `$ne`, `$gt`, `$gte`, `$lt`, `$lte`, `$between` |
4432
+ | `pbRatio` | Price to Book Ratio | Float | ratio | `$eq`, `$ne`, `$gt`, `$gte`, `$lt`, `$lte`, `$between` |
4433
+ | `evEbitda` | Enterprise Value to EBITDA | Float | ratio | `$eq`, `$ne`, `$gt`, `$gte`, `$lt`, `$lte`, `$between` |
4434
+ | `fcfYield` | Free Cash Flow Yield | Float | % | `$eq`, `$ne`, `$gt`, `$gte`, `$lt`, `$lte`, `$between` |
4435
+
3911
4436
  ### Profitability Ratios
3912
4437
  | Field | Description | Data Type | Unit | Supported Operations |
3913
4438
  |--- |--- |--- |--- |--- |
@@ -3915,14 +4440,41 @@ All supported environment variables:
3915
4440
  | `basicEpsAnnual` | Basic EPS - annual | Float64 | currency | `$eq`, `$ne`, `$gt`, `$gte`, `$lt`, `$lte`, `$between` |
3916
4441
  | `dilutedEpsQuarterly` | Diluted EPS - quarterly | Float64 | currency | `$eq`, `$ne`, `$gt`, `$gte`, `$lt`, `$lte`, `$between` |
3917
4442
  | `dilutedEpsAnnual` | Diluted EPS - annual | Float64 | currency | `$eq`, `$ne`, `$gt`, `$gte`, `$lt`, `$lte`, `$between` |
4443
+ | `roe` | Return on Equity | Nullable(Float32) | % | `$eq`, `$ne`, `$gt`, `$gte`, `$lt`, `$lte`, `$between` |
4444
+ | `roa` | Return on Assets | Nullable(Float32) | % | `$eq`, `$ne`, `$gt`, `$gte`, `$lt`, `$lte`, `$between` |
4445
+ | `ebitda` | Earnings Before Interest, Taxes, Depreciation, and Amortization | Nullable(Float64) | currency | `$eq`, `$ne`, `$gt`, `$gte`, `$lt`, `$lte`, `$between` |
4446
+ | `ebitMargin` | Earnings Before Interest and Taxes Margin | Nullable(Float32) | % | `$eq`, `$ne`, `$gt`, `$gte`, `$lt`, `$lte`, `$between` |
4447
+ | `EPS` | Earnings Per Share | Nullable(Float64) | currency | `$eq`, `$ne`, `$gt`, `$gte`, `$lt`, `$lte`, `$between` |
4448
+ | `epsCagr` | EPS Compounded Annual Growth Rate | Float | % | `$eq`, `$ne`, `$gt`, `$gte`, `$lt`, `$lte`, `$between` |
3918
4449
 
3919
4450
  ### Efficiency Ratios
3920
4451
  | Field | Description | Data Type | Unit | Supported Operations |
3921
4452
  |--- |--- |--- |--- |--- |
3922
4453
  | `assetTurnover` | Asset Turnover Ratio | Float | ratio | `$eq`, `$ne`, `$gt`, `$gte`, `$lt`, `$lte`, `$between` |
3923
4454
  | `currentRatio` | Current Ratio | Float | ratio | `$eq`, `$ne`, `$gt`, `$gte`, `$lt`, `$lte`, `$between` |
4455
+ | `ocfNPRatio` | Operating Cash Flow to Net Profit Ratio | Nullable(Float64) | ratio | `$eq`, `$ne`, `$gt`, `$gte`, `$lt`, `$lte`, `$between` |
3924
4456
  | `ocfPat` | Operating Cash Flow to PAT Ratio | Float | ratio | `$eq`, `$ne`, `$gt`, `$gte`, `$lt`, `$lte`, `$between` |
3925
4457
 
4458
+ ### Shareholding Patterns
4459
+
4460
+ #### Current Holdings
4461
+ | Field | Description | Data Type | Unit | Supported Operations |
4462
+ |--- |--- |--- |--- |--- |
4463
+ | `currentFiiHoldings` | Current FII holdings percentage (latest quarter) | Float64 | % | `$eq`, `$ne`, `$gt`, `$gte`, `$lt`, `$lte`, `$between` |
4464
+ | `currentDiiHoldings` | Current DII holdings percentage (latest quarter) | Float64 | % | `$eq`, `$ne`, `$gt`, `$gte`, `$lt`, `$lte`, `$between` |
4465
+ | `currentPromoterHoldings` | Current Promoter holdings percentage (latest quarter) | Float64 | % | `$eq`, `$ne`, `$gt`, `$gte`, `$lt`, `$lte`, `$between` |
4466
+ | `currentInstitutionalHoldings` | Current total institutional holdings percentage (latest quarter) | Float64 | % | `$eq`, `$ne`, `$gt`, `$gte`, `$lt`, `$lte`, `$between` |
4467
+ | `freeFloatPercentage` | Free float percentage (latest quarter) | Float64 | % | `$eq`, `$ne`, `$gt`, `$gte`, `$lt`, `$lte`, `$between` |
4468
+ | `freeFloatMarketCap` | Free-float market capitalization (latest trading day) | Float64 | currency | `$eq`, `$ne`, `$gt`, `$gte`, `$lt`, `$lte`, `$between` |
4469
+
4470
+ #### Quarter-on-Quarter Changes
4471
+ | Field | Description | Data Type | Unit | Supported Operations |
4472
+ |--- |--- |--- |--- |--- |
4473
+ | `qoqInstitutionalChange` | Quarter-on-quarter change in institutional holdings (%) | Float64 | % | `$eq`, `$ne`, `$gt`, `$gte`, `$lt`, `$lte`, `$between` |
4474
+ | `qoqFiiChange` | Quarter-on-quarter change in FII holdings (%) | Float64 | % | `$eq`, `$ne`, `$gt`, `$gte`, `$lt`, `$lte`, `$between` |
4475
+ | `qoqDiiChange` | Quarter-on-quarter change in DII holdings (%) | Float64 | % | `$eq`, `$ne`, `$gt`, `$gte`, `$lt`, `$lte`, `$between` |
4476
+ | `qoqPromoterChange` | Quarter-on-quarter change in Promoter holdings (%) | Float64 | % | `$eq`, `$ne`, `$gt`, `$gte`, `$lt`, `$lte`, `$between` |
4477
+
3926
4478
  ## Segment Analysis
3927
4479
 
3928
4480
  ### Segment Financial Data
@@ -3953,6 +4505,7 @@ All supported environment variables:
3953
4505
  | `hmdPriceBandLower` | Lower price band limit | Float | currency | `$eq`, `$ne`, `$gt`, `$gte`, `$lt`, `$lte`, `$between` |
3954
4506
  | `hmdPriceBandUpper` | Upper price band limit | Float | currency | `$eq`, `$ne`, `$gt`, `$gte`, `$lt`, `$lte`, `$between` |
3955
4507
  | `hmdDate` | Trading date | Date | - | `$eq`, `$ne`, `$gt`, `$gte`, `$lt`, `$lte`, `$between` |
4508
+ | `MarketCap` | Logarithm of Market Capitalization | Float64 | log_currency | `$eq`, `$ne`, `$gt`, `$gte`, `$lt`, `$lte`, `$between` |
3956
4509
 
3957
4510
  ### Supported Operations
3958
4511