Risk Management in Banking Archives - DexLab Analytics | Credit Risk | Market Risk | SAS Python Machine Learning Modeling

Credit Risk in Indian Banking: RBI Data Analysis

Credit Risk in Indian Banking: What RBI’s Data Actually Shows

Every risk professional in Indian banking eventually asks the same question: is credit risk actually improving, or does it just look that way in aggregate numbers? Based on the Reserve Bank of India’s own published data, the answer is both. System-wide asset quality has genuinely strengthened over the past five years. But the composition of that risk is shifting in a direction that deserves closer attention.

This piece works through RBI’s Financial Stability Reports (FSR), sectoral credit data, and the newly finalized Expected Credit Loss (ECL) framework. Together they show what’s really happening with credit risk in Indian banking between 2020 and 2025. It does not rely on a proprietary survey or projected estimates dressed up as findings. In fact, every figure below is sourced directly to a named RBI report. That distinction matters: in a domain where regulators, auditors, and rating agencies check your numbers, credibility is the entire product.

Three questions structure the analysis. How has aggregate asset quality moved since the 2020 pandemic shock? Where is risk concentrating today, even as headline numbers improve? And what does the incoming ECL regime signal about how Indian banks will need to manage credit risk going forward?

Methodology and Data Sources

This analysis draws on primary RBI publications, cross-checked across multiple reporting periods for consistency.

RBI Financial Stability Reports (FSR): Published twice yearly. They consolidate Gross NPA (GNPA) and Net NPA (NNPA) ratios of Scheduled Commercial Banks (SCBs), capital adequacy (CRAR), bank-group-wise asset quality, and stress test results. Specifically, this piece uses FSR editions from January 2021 through December 2025.

RBI Sectoral Deployment of Bank Credit data: Monthly data on credit growth to industry, services, agriculture, and personal loans. It’s sourced from 41 banks representing roughly 95% of non-food credit.

RBI’s ECL framework releases: The draft ECL directions (October 2025) and final directions (April 2026). These describe the shift from incurred-loss to forward-looking PD/LGD/EAD-based provisioning, effective April 1, 2027.

One scope note: RBI does not publish a standardized “default rate by loan product” table. Where this article cites loan-category or bank-group figures, they are GNPA ratios: the share of gross advances classified as non-performing. It’s the metric RBI itself uses, and the one directly comparable across periods.

Finding 1: Asset Quality Has Improved for Five Consecutive Years

SCB GNPA: from 8% to 2.1% in five years

 

PeriodGNPA RatioNNPA RatioSource
March 20208.4%RBI FSR, Jan 2021
September 20207.5%RBI FSR, Jan 2021
March 20242.8%0.6%RBI FSR, Jun 2024
March 20252.3%0.5%RBI FSR, Jun 2025
September 20252.1%–2.2%RBI FSR, Dec 2025
March 2027 (projected, baseline)1.9%RBI FSR, Dec 2025

 

RBI’s January 2021 report recorded a September 2020 GNPA ratio of 7.5%, down from 8.4% in March 2020. That was a system still absorbing the pandemic shock. GNPA had fallen to 2.8% by June 2024, then to 2.3% by March 2025. It touched a multi-decade low of 2.1% by September 2025, and RBI projects further improvement to 1.9% by March 2027 under its baseline scenario.

In practice, this reflects five years of balance sheet cleanup: post-IBC resolution of legacy corporate stress, tighter underwriting after the 2018–2020 NBFC stress episode, and stronger capital buffers overall. Meanwhile, system-wide CRAR remains comfortably above regulatory minimums, with public sector banks at 16% and private banks at 18.1% as of September 2025.

In short, aggregate GNPA is a lagging confirmation of underwriting discipline, not a leading indicator. A PD model trained mainly on 2020–2022 stressed data will overstate current default risk. One trained only on 2023–2025 benign data risks understating tail risk in the next downturn.

Explore our Credit Risk Modeling Certification Training for a structured approach to PD estimation across credit cycles.

Finding 2: Improvement Isn’t Even Across Bank Groups

PSBs are catching up fast

For instance, PSB GNPA fell sharply from 3.7% in March 2024 to 2.8% in March 2025. Meanwhile, private bank GNPA held roughly stable at 2.8% over the same period, and foreign banks improved from 1.2% to 0.9%.

Even so, this convergence matters. For most of the post-2015 asset-quality-review era, PSB asset quality lagged private banks significantly, largely on corporate exposures. That gap has now nearly closed at the aggregate level. However, remaining risk differs by bank group, which leads to the more consequential finding below.

Finding 3: Unsecured Retail Is Where New Risk Concentrates

The retail risk hiding inside a good headline number

This is the most important finding for practitioners, because it sits underneath the reassuring headline number. According to RBI’s December 2025 FSR, roughly 53.1% of retail loan slippages now originate from unsecured products like personal loans and credit cards. At private banks, unsecured loans account for nearly 76% of fresh slippages. GNPA on unsecured retail loans stood at 1.8%, versus 1.1% for overall retail advances.

In other words, the 2.1% aggregate GNPA figure blends a very clean secured/corporate book with a smaller, faster-deteriorating unsecured retail book. RBI flagged this as a fintech-adjacent risk, tied to fast credit growth in small-ticket personal loans to borrowers under 35 through digital lending channels.

This pattern, in fact, tracks with operational experience. Unsecured lending has weaker recovery mechanics (no collateral to liquidate, higher LGD), shorter behavioral history on new-to-credit borrowers, and faster origination cycles that compress underwriting review. Moreover, it is the segment where forward-looking provisioning matters most, since unsecured risk builds up quietly between formal NPA recognition points.

As a result, portfolio-level GNPA alone is no longer sufficient. Overall, segment-level GNPA and vintage curves for unsecured retail belong alongside the aggregate number in any board-level risk dashboard.

Finding 4: ECL Will Formalize This Shift

Why the 2027 ECL shift matters here

RBI has issued directions introducing forward-looking ECL provisioning, replacing the incurred-loss model. It takes effect April 1, 2027, for scheduled commercial banks excluding RRBs, Small Finance Banks, and payments banks. ECL provisioning must be based on a bank’s own historical PD and LGD data spanning at least five years, subject to RBI-specified floors. Accounts 30–90 days past due move into Stage 2, a materially earlier trigger than the current framework.

Overall, the shift aligns India’s prudential norms with global IFRS 9 standards. In addition, it requires closer integration between finance and risk functions, as forward-looking macroeconomic scenarios become a formal input to provisioning.

Indeed, this is a direct regulatory response to Finding 3. An incurred-loss model recognizes impairment only after default has effectively occurred. ECL requires estimating expected loss, via PD, LGD, and EAD, well before that point, catching unsecured deterioration earlier in the cycle.

Even so, for banks building this capability, it isn’t a compliance task to fully outsource. RBI has explicitly made a bank’s board and senior management responsible for the adequacy of the ECL framework. Consequently, internal teams need working fluency in PD/LGD/EAD construction, not just the ability to read vendor output. However, it’s worth noting that the standard formula, Expected Loss = PD × LGD × EAD, assumes independence between the three components. In practice they’re correlated: LGD tends to rise in the same downturns that push PD higher. That’s why RBI’s stress tests apply adverse scenarios jointly rather than multiplying baseline figures in isolation.

What This Means for Banks and Risk Teams

  • First, aggregate GNPA improvement is real but incomplete. Segment-level monitoring, especially for unsecured retail, deserves as much attention as the headline ratio.
  • PD/LGD model recency matters. RBI’s own five-year minimum spans both a stressed period (2020–2021) and a benign one (2023–2025). Models need to represent both.
  • Collateral still matters, but isn’t the whole story. Unsecured products drive a disproportionate share of new slippages. In turn, this argues for tighter underwriting in that segment, not a wholesale retreat from unsecured lending.
  • Finally, the 2027 ECL deadline is closer than it looks. In practice, building five years of clean PD/LGD data and validation capability is a multi-year undertaking. Banks starting in 2026 are already behind institutions that began in 2024–2025.
  • Recovery rate discipline matters for LGD. LGD = 1 − Recovery Rate only holds up when ‘recovery rate’ is the economic, discounted, net-of-cost rate, not the nominal amount eventually collected.

Explore our Credit Risk Modeling Certification Training to build PD, LGD, and EAD modeling skills ahead of the 2027 ECL transition, or see Understanding Credit Risk: Definition and Types for foundational concepts referenced throughout.

FAQ

What is the current GNPA ratio of Indian banks?

As of September 2025, SCB GNPA stood at 2.1%, a multi-decade low, per RBI’s December 2025 Financial Stability Report.

Is unsecured lending riskier than secured lending right now?

Yes, and the gap is widening. Unsecured retail GNPA was 1.8% versus 1.1% for overall retail advances, and unsecured products drove over half of all retail slippages.

When does RBI’s ECL framework take effect?

RBI’s ECL Directions were issued 27 April 2026 and take effect April 1, 2027. They apply to commercial banks, excluding small finance banks, payments banks, and local area banks.

Does EL = PD × LGD × EAD fully capture expected loss?

It’s the standard starting formula, but it assumes PD, LGD, and EAD move independently. In stress, they’re correlated — which is why RBI applies adverse scenarios jointly rather than multiplying baseline values.

Conclusion

The data supports a measured conclusion, not a triumphant one. Indeed, Indian banking’s asset quality genuinely improved for five straight years, and RBI’s own numbers back that up without embellishment. However, the same data shows risk isn’t disappearing. Instead, it’s relocating toward unsecured retail lending, addressed through a regulatory shift that will demand more rigorous PD, LGD, and EAD modeling capability than most institutions currently have in-house. For risk analysts, credit officers, and model validators, that combination is telling: improving headline numbers alongside a harder compliance mandate. It’s exactly why 2025–2027 is a build-capability window, not a wait-and-see one.

This analysis is based on RBI’s Financial Stability Reports, Sectoral Deployment of Bank Credit data, and RBI’s ECL Directions (2025–2026). Figures are reported as published at the cited dates; readers should consult original RBI releases for the most current data.

 

Ready to Build These Skills Hands-On?

Understanding the theory behind PD, LGD, and EAD is the first step. Building bankable, interview-ready models — in Python or SAS, on real credit datasets, aligned to Basel and IFRS 9 — is what actually moves a career forward.

Explore Dexlab Analytics’ Credit Risk Modeling certification program to build PD, LGD, and EAD models from scratch, work through IFRS 9 ECL frameworks, and learn model validation techniques used by practicing risk teams.

 


.

What is Credit Risk? Understanding Credit Risk Definition and Types

Understanding Credit Risk: Definition and Types

Introduction

In March 2021, a little-known family office called Archegos Capital Management defaulted on margin calls from its banks. Within days, Credit Suisse lost $5.5 billion. Nomura lost close to $2.5 billion. Morgan Stanley and UBS lost roughly $1 billion and $774 million. Combined, global banks lost more than $10 billion — not because of a market crash, but because of one counterparty’s concentrated, hidden leverage.

That’s credit risk in its purest form. It’s the possibility that someone you’ve extended money or exposure to won’t pay it back, and the cascading damage that follows when large exposures go bad at once.

Most people equate credit risk with loan defaults. That’s only part of the picture. Credit risk shows up in derivatives, trade settlements, corporate bonds, and interbank lending. It appears anywhere one party depends on another to deliver.

This guide breaks down what credit risk actually means. It covers the distinct types every risk professional needs to recognize, and how banks measure and manage it in practice, in India and globally.

What is Credit Risk?

Credit risk is the possibility that a borrower or counterparty fails to meet a financial obligation, causing a loss to the lender. That’s the formal definition. In plain terms: it’s the risk that you lend money, extend credit, or enter a contract with someone, and they don’t hold up their end.
The Reserve Bank of India’s Guidance Note on Credit Risk Management frames it more precisely. Credit risk can be an individual transaction risk — the chance that one specific loan goes bad. Or it can be a portfolio risk, which looks at how credit losses behave in aggregate across a bank’s book. A single bad loan is a manageable, expected cost of doing business. Thousands of correlated bad loans, going bad at once because they share a common vulnerability, is a solvency event.

Credit risk isn’t limited to banks lending to individuals or businesses. It appears in:

  • Loans and advances — the most familiar form, where a borrower fails to repay principal or interest
  • Bonds and fixed-income securities — where an issuer defaults on coupon payments or principal at maturity
  • Derivatives contracts — where a counterparty can’t meet its obligations under a swap, option, or forward
  • Trade finance and settlement — where one party in a transaction fails to deliver cash or securities as agreed
  • Guarantees and letters of credit — where a bank stands behind another party’s obligation and gets called on to pay

Under the Basel framework, credit risk-weighted assets typically make up the largest share of the capital a bank must hold. That’s larger than market risk or operational risk combined, for most commercial banks. This is why understanding credit risk isn’t a niche specialty. It’s the foundation most of banking risk management sits on.

Types of Credit Risk

Credit risk isn’t one uniform threat. RBI’s own framework splits transaction-level credit risk into default risk and rating migration risk. It splits portfolio-level risk into intrinsic risk and concentration risk. Layered on top of that, banking practice recognizes several distinct sub-types worth understanding individually. Three matter most for anyone building a working knowledge of the field: counterparty risk, concentration risk, and settlement risk.

The distinction isn’t academic. Each type demands a different measurement approach, a different mitigation strategy, and often a different team within a bank’s risk function. A credit officer underwriting a retail loan thinks primarily about default risk on that single borrower. A treasury desk trading derivatives thinks primarily about counterparty risk and daily mark-to-market exposure. A chief risk officer reviewing the whole institution thinks about concentration across the entire book. Does the bank have too much riding on one sector, one region, or one large group of related borrowers? Confusing these categories, or managing them with a single generic framework, is exactly how risks that look small individually compound into something systemic.

Counterparty Risk

Counterparty risk is the risk that the other party in a financial contract fails to fulfill their side of the deal. This isn’t a traditional borrower — it’s a trading or derivatives counterparty. It’s especially relevant in derivatives, securities lending, and prime brokerage relationships. There, exposure isn’t a fixed loan amount. It’s a fluctuating mark-to-market value.

The Archegos collapse is the clearest recent illustration. Archegos used total return swaps to build enormous, concentrated positions in a small number of stocks. It never owned the shares directly, and never disclosed the size of its bets. Its prime brokers — Credit Suisse, Nomura, Morgan Stanley, Goldman Sachs, and UBS — each saw only their own slice of Archegos’s exposure. None had visibility into the full picture. When the fund’s portfolio value fell roughly 30% in four days in March 2021, it couldn’t meet margin calls. Its brokers had to liquidate billions of dollars in positions simultaneously. Those unable to exit fast enough absorbed massive losses.

Analysts who studied the collapse point to a specific, technical failure mode: wrong-way risk. This occurs when a bank’s exposure to a counterparty grows precisely as that counterparty’s ability to pay deteriorates. Archegos’s swap exposure ballooned in tandem with its portfolio’s decline. The worse things got, the more the banks were owed, and the less able Archegos was to cover it. The European Central Bank later reviewed 23 major banks’ derivatives exposures. It found “material shortcomings” in how counterparty credit risk was governed across the industry.

Concentration Risk

Concentration risk arises when a bank’s credit exposure clusters too heavily around a single borrower, sector, geography, or risk factor. Diversification is supposed to protect a lender. If one borrower fails, the loss should be a small fraction of the total book. Concentration undermines that protection entirely.

Archegos illustrates this too, in a second way. The fund’s own portfolio was concentrated in a handful of technology and media stocks. When those specific names fell, there was no offsetting position to cushion the blow. The losses hit every position at once. Banks face the mirror image of this problem in lending. Heavy exposure to one industry, real estate for instance, or one large corporate group, means a single sector downturn can impair a disproportionate share of the loan book. RBI’s prudential framework directly addresses this. It sets single-borrower and group-borrower exposure limits specifically to prevent Indian banks from building the kind of concentrated exposure that made Archegos so dangerous to its lenders.

Settlement Risk

Settlement risk is sometimes called Herstatt risk, after the 1974 collapse of Bankhaus Herstatt. It’s the risk that one party in a transaction delivers its side — cash or securities — while the counterparty fails to deliver theirs. This typically happens because of timing gaps, or the counterparty’s failure between trade execution and final settlement. Herstatt was shut down by German regulators mid-day. By then it had already received Deutsche Mark payments from counterparties, but it hadn’t yet sent back the US dollars it owed in return. Banks on the other side of those foreign exchange trades lost their payments outright.

That single event reshaped global payments infrastructure. It led directly to the creation of CLS Bank, a settlement system designed specifically to eliminate this timing gap in foreign exchange transactions. CLS does this by settling both legs of a trade simultaneously. Settlement risk remains a live concern anywhere payment and delivery aren’t simultaneous. It’s a reminder that credit risk isn’t only about long-term loans — it can materialize in a transaction that’s supposed to finish within hours.

Default Risk Explained

Default risk sits at the center of every credit risk framework. It’s the risk that a borrower simply stops paying. Understanding what causes defaults, and how professionals frame the probability of one occurring, is foundational to everything else in credit risk modeling.

It’s also the oldest form of credit risk banks have grappled with. Long before derivatives, prime brokerage, or cross-border settlement systems existed, lenders were already trying to predict which borrowers would repay and which wouldn’t. Every other risk type covered in this guide is, in some sense, a more specialized variant of the same underlying question: will the party on the other side of this transaction deliver what they owe? Default risk asks that question in its most direct form, applied to a straightforward loan or credit exposure.

What Causes Defaults

Defaults rarely happen for one isolated reason. They typically result from a mix of factors:

  1. Cash flow deterioration. A borrower’s income or business revenue falls below what’s needed to service debt. For individuals, this might mean job loss. For corporates, it might mean a demand shock or margin compression.
  2. Over-leverage. A borrower takes on more debt than their income can realistically support, leaving no buffer when conditions turn even mildly unfavorable.
  3. Macroeconomic shocks. Recessions, interest rate spikes, or sector-wide downturns push otherwise healthy borrowers into distress simultaneously — the mechanism behind concentration risk turning into realized losses.
  4. Governance and fraud. Misrepresented financials, diverted funds, or outright fraud can turn an apparently strong borrower into a default risk overnight. Archegos itself is a governance case as much as a market one — Bill Hwang was later convicted on fraud and racketeering charges tied to how the fund misled its own counterparties about position size and concentration.
  5. Willful default. Occasionally, a borrower who can pay simply chooses not to, usually when the cost of default (reputational or legal) is judged lower than the cost of repayment.

The Probability Framework

Rather than treating default as a binary surprise, credit risk professionals model it as a probability. A Probability of Default (PD) is expressed as a percentage likelihood that a borrower defaults within a defined time horizon, typically 12 months for regulatory purposes. A PD of 2% doesn’t mean a specific borrower is “slightly risky.” It means that, across a large pool of similar borrowers, roughly 2 in 100 are expected to default within that window.

This probabilistic framing matters. It converts an unpredictable individual event into something a bank can price, provision for, and manage at portfolio scale. Building a reliable PD estimate is a discipline in its own right — deciding which borrower characteristics matter, which statistical technique to use, and how to validate the result. We cover the full methodology, including logistic regression and survival analysis, in our detailed guide to PD estimation.

What matters at this stage is the underlying logic: default isn’t modeled as a yes/no outcome for an individual borrower. It’s modeled as a rate across a population, calibrated against historical data and adjusted for current conditions.

Credit Risk in International Banking

Credit risk doesn’t stop at national borders, and neither does its regulation. Two frameworks matter most for anyone working in or around Indian banking. One is the International Accounting Standards Board’s approach to credit loss recognition. The other is RBI’s domestic prudential framework.

Why does a domestic Indian bank need to care about an international accounting standard? Because capital markets are global, even when a bank’s loan book isn’t. Foreign investors, rating agencies, and cross-border lenders all benchmark a bank’s provisioning and capital adequacy against international norms, whether or not that bank operates outside India. A framework that looks conservative by domestic standards can still look under-provisioned by global standards. That gap shows up directly in borrowing costs, credit ratings, and investor confidence.

The IASB and IFRS 9

The International Accounting Standards Board (IASB) issued IFRS 9 specifically to fix a weakness exposed by the 2008 financial crisis. The old “incurred loss” model only recognized credit losses after a default had already happened — by which point it was too late for provisions to cushion the blow. IFRS 9 replaced that with an Expected Credit Loss (ECL) model. It requires banks to recognize losses based on forward-looking estimates, before default occurs. IFRS 9 has been adopted across more than 140 jurisdictions worldwide, making it one of the most widely applied accounting standards in global banking.

RBI’s Framework and India’s ECL Transition

India has historically run on a different system: the Income Recognition and Asset Classification (IRAC) norms. These classify loans as standard, sub-standard, doubtful, or loss, based on how many days they’re overdue, and provision accordingly. That’s closer to the old “incurred loss” approach IFRS 9 was designed to replace.

That’s now changing. RBI has confirmed that an ECL-based provisioning framework, with prudential floors, will apply to all Scheduled Commercial Banks from April 1, 2027. Under the new norms, banks will classify financial assets into Stage 1, Stage 2, or Stage 3. That classification depends on assessed credit losses at initial recognition, and at each subsequent reporting date — directly mirroring the IFRS 9 structure used globally.

RBI has also been actively updating its credit risk rules to align with Basel Committee on Banking Supervision (BCBS) standards. In 2026, it revised its counterparty credit risk framework specifically to bring India’s derivatives exposure measurement closer to global norms. That’s a change regulators internationally have prioritized in the years following the Archegos collapse. India’s Capital-to-Risk-Weighted-Assets Ratio (CRAR) requirement of 9% for scheduled commercial banks also exceeds the 8% global Basel III minimum. That reflects RBI’s consistently more conservative capital stance relative to international baselines.

Measuring Credit Risk

Defining and categorizing credit risk only gets a risk team so far. Managing it requires quantifying it — turning a qualitative concern into numbers that inform pricing, provisioning, and capital decisions. Four metrics form the core toolkit.

Probability of Default (PD)

As covered above, PD is the percentage likelihood that a borrower defaults within a set time horizon. It’s typically estimated through logistic regression or survival analysis, using historical repayment data, bureau scores, and financial ratios as inputs. PD is the starting point for nearly every downstream credit risk calculation.

Loss Given Default (LGD)

Default doesn’t automatically mean total loss. LGD measures the proportion of exposure a lender expects to actually lose after accounting for recoveries — collateral liquidation, guarantees, or restructuring. Getting LGD right requires more care than it first appears. It has to reflect the economic recovery rate, discounted for the time value of money and net of recovery costs — not just the raw cash eventually collected. A recovery that takes three years to materialize is worth meaningfully less than the same amount recovered immediately.

Credit Ratings

Credit ratings translate a borrower’s creditworthiness into a standardized letter grade, from investment-grade (AAA down to BBB-) to speculative or junk grades below that. In India, these come from agencies like CRISIL, ICRA, and CARE; internationally, from S&P, Moody’s, and Fitch. Ratings aren’t a substitute for internal PD modeling. But they serve two practical purposes. They give banks an independent, externally validated view of risk. And they directly feed into regulatory risk-weighting under the Basel Standardised Approach, where a lower rating translates into a higher capital charge against that exposure.

Expected Loss and Exposure at Default (EAD)

Exposure at Default (EAD) measures how much a lender is actually on the hook for at the moment a default happens. For revolving credit like credit cards, this can run higher than the current outstanding balance, since distressed borrowers often draw down more of their available limit before defaulting. Combining EAD with PD and LGD produces Expected Loss (EL) — the amount a bank should provision for a given exposure on average. It’s worth noting this combined figure is a standard industry simplification. It assumes PD, LGD, and EAD move independently, which understates risk in downturns, when all three tend to move against the lender simultaneously. Regulators address this specific gap by requiring “downturn” LGD and EAD estimates, rather than accepting benign-cycle averages alone.

Used together, these four metrics let a bank move from “this borrower feels risky” to a specific number. That number can be priced into a loan, provisioned for on the balance sheet, and reported to regulators with a defensible methodology behind it.

Conclusion

Credit risk is broader and more structured than “will this loan get repaid.” It spans counterparty exposure in derivatives, concentration across a portfolio, settlement timing in payments, and default at the level of an individual borrower. Each has distinct causes, distinct historical failures, and distinct measurement approaches. Understanding what is credit risk at this level of detail is the foundation every subsequent risk modeling technique builds on, from PD estimation through to full expected-loss calculation.

The Archegos collapse, the 2027 shift to ECL-based provisioning in India, and RBI’s ongoing alignment with Basel counterparty risk standards all point to the same conclusion. Credit risk management is not static. It evolves in direct response to the failures that expose its gaps.

Explore our Credit Risk Modeling Certification Training to master Risk Analytics. Build the PD, LGD, and EAD models covered here from scratch. Work through India’s transition to ECL provisioning, and learn the model validation techniques practicing risk teams use every day.

 


.

MongoDB Basics Part-II

In our previous blog we discussed about few of the basic functions of MQL like .find() , .count() , .pretty() etc. and in this blog we will continue to do the same. At the end of the blog there is a quiz for you to solve, feel free to test your knowledge and wisdom you have gained so far.

Given below is the list of functions that can be used for data wrangling:-

  1. updateOne() :- This function is used to change the current value of a field in a single document.

After changing the database to “sample_geospatial” we want to see what the document looks like? So for that we will use .findOne() function.

Now lets update the field value of “recrd” from ‘ ’ to “abc” where the “feature_type” is ‘Wrecks-Visible’.

Now within the .updateOne() funtion any thing in the first part of { } is the condition on the basis of which we want to update the given document and the second part is the changes which we want to make. Here we are saying that set the value as “abc” in the “recrd” field . In case you wanted to increase the value by a certain number ( assuming that the value is integer or float) you can use “$inc” instead.

2. updateMany() :- This function updates many documents at once based on the condition provided.

3. deleteOne() & deleteMany() :- These functions are used to delete one or many documents based on the given condition or field.

4. Logical Operators :-

“$and” : It is used to match all the conditions.

“$or” : It is used to match any of the conditions.

The first code matches both the conditions i.e. name should be “Wetpaint” and “category_code” should be “web”, whereas the second code matches any one of the conditions i.e. either name should be “Wetpaint” or “Facebook”. Try these codes and see the difference by yourself.

 

So, with that we come to the end of the discussion on the MongoDB Basics. Hopefully it helped you understand the topic, for more information you can also watch the video tutorial attached down this blog. The blog is designed and prepared by Niharika Rai, Analytics Consultant, DexLab Analytics DexLab Analytics offers machine learning courses in Gurgaon. To keep on learning more, follow DexLab Analytics blog.


.

MongoDB Basics Part-I

In this particular blog we will discuss about few of the basic functions of MQL (MongoDB Query Language) and we will also see how to use them? We will be using MongoDB Compass shell (MongoSH Beta) which is available in the latest version of MongoDB Compass.

Connect your Atlas cluster to your MongoDB Compass to get started. Latest version of  MongoDB Compass will have this shell, so if you don’t find this shell then please install the latest version for this to work.

Now lets start with the functions.

  1. find() :- You need this function for data extraction in the shell.

In the shell we need to first write the “use database name”  code to access the database  then use .find() to extract data which has name “Wetpaint”

For the above query we get the following result:-

 

The above result brings us to another function .pretty() .

2. pretty() :- this function helps us see the result more clearly.

Try it yourself to compare the results.

3. count() :- Now lets see how many entries we have by the company name “Wetpaint”.

So we have only one document.

4. Comparison operators :-

“$eq” : Equal to

“$neq”: Not equal to

“$gt”: Greater than

“$gte”: Greater than equal to

“$lt”: Less than

“$lte”: Less than equal to

Lets see how this works.

5. findOne() :- To get a single document from a collection we use this function.

 

6. insert() :- This is used to insert documents in a collection.

Now lets check if we have been able to insert this document or not.

Notice that a unique id has been added to the document by default. The given id has to be unique or else there will be an error. To provide a user defined  id use “_id”.

 

So, with that we come to the end of the discussion on the MongoDB. Hopefully it helped you understand the topic, for more information you can also watch the video tutorial attached down this blog. The blog is designed and prepared by Niharika Rai, Analytics Consultant, DexLab Analytics DexLab Analytics offers machine learning courses in Gurgaon. To keep on learning more, follow DexLab Analytics blog.


.

Time Series Analysis Part I

 

A time series is a sequence of numerical data in which each item is associated with a particular instant in time. Many sets of data appear as time series: a monthly sequence of the quantity of goods shipped from a factory, a weekly series of the number of road accidents, daily rainfall amounts, hourly observations made on the yield of a chemical process, and so on. Examples of time series abound in such fields as economics, business, engineering, the natural sciences (especially geophysics and meteorology), and the social sciences.

  • Univariate time series analysis- When we have a single sequence of data observed over time then it is called univariate time series analysis.
  • Multivariate time series analysis – When we have several sets of data for the same sequence of time periods to observe then it is called multivariate time series analysis.

The data used in time series analysis is a random variable (Yt) where t is denoted as time and such a collection of random variables ordered in time is called random or stochastic process.

Stationary: A time series is said to be stationary when all the moments of its probability distribution i.e. mean, variance , covariance etc. are invariant over time. It becomes quite easy forecast data in this kind of situation as the hidden patterns are recognizable which make predictions easy.

Non-stationary: A non-stationary time series will have a time varying mean or time varying variance or both, which makes it impossible to generalize the time series over other time periods.

Non stationary processes can further be explained with the help of a term called Random walk models. This term or theory usually is used in stock market which assumes that stock prices are independent of each other over time. Now there are two types of random walks:
Random walk with drift : When the observation that is to be predicted at a time ‘t’ is equal to last period’s value plus a constant or a drift (α) and the residual term (ε). It can be written as
Yt= α + Yt-1 + εt
The equation shows that Yt drifts upwards or downwards depending upon α being positive or negative and the mean and the variance also increases over time.
Random walk without drift: The random walk without a drift model observes that the values to be predicted at time ‘t’ is equal to last past period’s value plus a random shock.
Yt= Yt-1 + εt
Consider that the effect in one unit shock then the process started at some time 0 with a value of Y0
When t=1
Y1= Y0 + ε1
When t=2
Y2= Y1+ ε2= Y0 + ε1+ ε2
In general,
Yt= Y0+∑ εt
In this case as t increases the variance increases indefinitely whereas the mean value of Y is equal to its initial or starting value. Therefore the random walk model without drift is a non-stationary process.

So, with that we come to the end of the discussion on the Time Series. Hopefully it helped you understand time Series, for more information you can also watch the video tutorial attached down this blog. DexLab Analytics offers machine learning courses in delhi. To keep on learning more, follow DexLab Analytics blog.


.

Incredible Future Possibilities of Market Risk Analytics

Global risks are burgeoning; companies of all sizes are seeking the perks of risk analytics and management. Smart companies are realizing the change is coming from people as well as recent technological breakthroughs, including Big Data and AI. And CEOs are improvising their risk teams, and transforming them into perceptive strategic advisors to address budding dangerous threats like cybercrime.

 
Incredible Future Possibilities of Market Risk Analytics
 

Modern risk analysts have accurate knowledge about risk, artificial intelligence and cyber security – so, it’s time they get an opportunity to show a greater presence in the stoic boardrooms as strategic advisors. AI, the cutting-edge risk analytics tool surfaced out to enhance the inexorable march of big data. As such, their importance in the organization in assessing risk has greatly increased.

Continue reading “Incredible Future Possibilities of Market Risk Analytics”

Risk Analytics Market: Serious Growth Rate Projection for 2017-2021

Want to get to the core of understanding risk within various business frameworks? The answer is Risk Analytics. This new breed of data analytics facilitates organizations in precisely defining, recognizing and managing their risk, and its need is going to increase in the coming few years. New developments in risk analytics are gaining limelight and bringing a notable transformation in the market, while enhancing its overall capability.

 
Risk Analytics Market: Serious Growth Rate Projection for 2017-2021
 

Recently, a team of analysts had eureka moment – they introduced a new concept of real-time risk analytics – it is nothing but a modern, more advanced version of traditional risk analytics methods. Here, the prediction is based on real-time data – it processes, examines and determines risk all on a real-time basis – hence top notch financial institutions are putting real-time risk analytics to best use to manage and mitigate associated risks. Several asset management, portfolio management and hedge fund firms, and investment banks are relying on this mode of risk analytics to modify their operating principles to play in accordance with investment and market shifts.

Continue reading “Risk Analytics Market: Serious Growth Rate Projection for 2017-2021”

What the Future Holds for Risk Management in Banking

The past decade saw some impressive changes brought into the aorta of risk management. And the change is showing no signs of slowing down, now.

 
What the Future Holds for Risk Management in Banking
 

In order to keep pace with the changing times, you need to get to the crux of these five trends that are shaping the role of risk management in banking sector: Continue reading “What the Future Holds for Risk Management in Banking”

Call us to know more