# atharva0123/customer-stock-lifetime-value-risk-prediction- architecture

> Architecture diagram of the GitHub repository atharva0123/customer-stock-lifetime-value-risk-prediction-, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-29). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/atharva0123/customer-stock-lifetime-value-risk-prediction-
- Repository: https://github.com/atharva0123/customer-stock-lifetime-value-risk-prediction-

## Overview

This repository is a notebook-based financial analytics prototype that combines market and client signals to estimate survival-adjusted customer lifetime value (CLV). Its documented workflow runs from Yahoo Finance and client data through risk, cohort, feature, survival, and revenue-model stages to client-level scores and business outputs. The README documents these capabilities and relationships; notebook source was not provided, so implementation details beyond that documentation are not represented.

Main entry points: [`Customer_Stock_Lifetime_Value&Risk_Bankruptcy.ipynb`](https://github.com/atharva0123/customer-stock-lifetime-value-risk-prediction-/blob/main/Customer_Stock_Lifetime_Value%26Risk_Bankruptcy.ipynb) (Feature Engineering)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_market["Market Analysis"]
  node_market_risk["Market Risk"]
  node_stress["Stress Index"]
  node_bankruptcy["Bankruptcy Screen"]
end

subgraph group_client["Client Analytics"]
  node_client_data["Client Data"]
  node_cohorts["Cohort Analysis"]
  node_features["Feature Engineering"]
end

subgraph group_model["CLV Modeling"]
  node_survival["Survival Models"]
  node_regression["CLV Regression"]
  node_blended_clv["Blended CLV"]
end

subgraph group_outputs["Business Outputs"]
  node_dashboard["Business Dashboard"]
  node_scorecard["CLV Scorecard"]
end

node_yahoo(("Yahoo Finance"))
node_client_inputs(("Client CSVs"))

node_yahoo -->|"provides prices"| node_market_risk
node_yahoo -->|"provides fundamentals"| node_bankruptcy
node_market_risk -->|"feeds indicators"| node_stress
node_stress -->|"adds stress signals"| node_features
node_client_inputs -.->|"supplies CSVs"| node_client_data
node_client_data -->|"feeds transactions"| node_cohorts
node_client_data -->|"feeds client history"| node_features
node_cohorts -->|"provides cohort context"| node_features
node_features -->|"provides features"| node_survival
node_features -->|"provides features"| node_regression
node_survival -->|"adjusts for survival"| node_blended_clv
node_regression -->|"provides revenue estimate"| node_blended_clv
node_blended_clv -->|"supplies client values"| node_dashboard
node_dashboard -->|"exports CSV"| node_scorecard

click node_market_risk "https://github.com/atharva0123/customer-stock-lifetime-value-risk-prediction-/blob/main/Customer_Stock_Lifetime_Value%26Risk_Bankruptcy.ipynb"
click node_stress "https://github.com/atharva0123/customer-stock-lifetime-value-risk-prediction-/blob/main/Customer_Stock_Lifetime_Value%26Risk_Bankruptcy.ipynb"
click node_bankruptcy "https://github.com/atharva0123/customer-stock-lifetime-value-risk-prediction-/blob/main/Customer_Stock_Lifetime_Value%26Risk_Bankruptcy.ipynb"
click node_client_data "https://github.com/atharva0123/customer-stock-lifetime-value-risk-prediction-/blob/main/Customer_Stock_Lifetime_Value%26Risk_Bankruptcy.ipynb"
click node_cohorts "https://github.com/atharva0123/customer-stock-lifetime-value-risk-prediction-/blob/main/Customer_Stock_Lifetime_Value%26Risk_Bankruptcy.ipynb"
click node_features "https://github.com/atharva0123/customer-stock-lifetime-value-risk-prediction-/blob/main/Customer_Stock_Lifetime_Value%26Risk_Bankruptcy.ipynb"
click node_survival "https://github.com/atharva0123/customer-stock-lifetime-value-risk-prediction-/blob/main/Customer_Stock_Lifetime_Value%26Risk_Bankruptcy.ipynb"
click node_regression "https://github.com/atharva0123/customer-stock-lifetime-value-risk-prediction-/blob/main/Customer_Stock_Lifetime_Value%26Risk_Bankruptcy.ipynb"
click node_blended_clv "https://github.com/atharva0123/customer-stock-lifetime-value-risk-prediction-/blob/main/Customer_Stock_Lifetime_Value%26Risk_Bankruptcy.ipynb"
click node_dashboard "https://github.com/atharva0123/customer-stock-lifetime-value-risk-prediction-/blob/main/Customer_Stock_Lifetime_Value%26Risk_Bankruptcy.ipynb"
click node_scorecard "https://github.com/atharva0123/customer-stock-lifetime-value-risk-prediction-/blob/main/Customer_Stock_Lifetime_Value%26Risk_Bankruptcy.ipynb"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_market_risk,node_stress,node_bankruptcy,node_client_inputs toneBlue
class node_client_data,node_cohorts,node_features toneAmber
class node_survival,node_regression,node_blended_clv toneMint
class node_dashboard,node_scorecard toneRose
class node_yahoo toneIndigo
```

## Components

### Market Analysis

- [Market Risk](https://github.com/atharva0123/customer-stock-lifetime-value-risk-prediction-/blob/main/Customer_Stock_Lifetime_Value%26Risk_Bankruptcy.ipynb): `Customer_Stock_Lifetime_Value&Risk_Bankruptcy.ipynb`
- [Stress Index](https://github.com/atharva0123/customer-stock-lifetime-value-risk-prediction-/blob/main/Customer_Stock_Lifetime_Value%26Risk_Bankruptcy.ipynb): `Customer_Stock_Lifetime_Value&Risk_Bankruptcy.ipynb`
- [Bankruptcy Screen](https://github.com/atharva0123/customer-stock-lifetime-value-risk-prediction-/blob/main/Customer_Stock_Lifetime_Value%26Risk_Bankruptcy.ipynb): `Customer_Stock_Lifetime_Value&Risk_Bankruptcy.ipynb`

### Client Analytics

- [Client Data](https://github.com/atharva0123/customer-stock-lifetime-value-risk-prediction-/blob/main/Customer_Stock_Lifetime_Value%26Risk_Bankruptcy.ipynb): `Customer_Stock_Lifetime_Value&Risk_Bankruptcy.ipynb`
- [Cohort Analysis](https://github.com/atharva0123/customer-stock-lifetime-value-risk-prediction-/blob/main/Customer_Stock_Lifetime_Value%26Risk_Bankruptcy.ipynb): `Customer_Stock_Lifetime_Value&Risk_Bankruptcy.ipynb`
- [Feature Engineering](https://github.com/atharva0123/customer-stock-lifetime-value-risk-prediction-/blob/main/Customer_Stock_Lifetime_Value%26Risk_Bankruptcy.ipynb): `Customer_Stock_Lifetime_Value&Risk_Bankruptcy.ipynb`

### CLV Modeling

- [Survival Models](https://github.com/atharva0123/customer-stock-lifetime-value-risk-prediction-/blob/main/Customer_Stock_Lifetime_Value%26Risk_Bankruptcy.ipynb): `Customer_Stock_Lifetime_Value&Risk_Bankruptcy.ipynb`
- [CLV Regression](https://github.com/atharva0123/customer-stock-lifetime-value-risk-prediction-/blob/main/Customer_Stock_Lifetime_Value%26Risk_Bankruptcy.ipynb): `Customer_Stock_Lifetime_Value&Risk_Bankruptcy.ipynb`
- [Blended CLV](https://github.com/atharva0123/customer-stock-lifetime-value-risk-prediction-/blob/main/Customer_Stock_Lifetime_Value%26Risk_Bankruptcy.ipynb): `Customer_Stock_Lifetime_Value&Risk_Bankruptcy.ipynb`

### Business Outputs

- [Business Dashboard](https://github.com/atharva0123/customer-stock-lifetime-value-risk-prediction-/blob/main/Customer_Stock_Lifetime_Value%26Risk_Bankruptcy.ipynb): `Customer_Stock_Lifetime_Value&Risk_Bankruptcy.ipynb`
- [CLV Scorecard](https://github.com/atharva0123/customer-stock-lifetime-value-risk-prediction-/blob/main/Customer_Stock_Lifetime_Value%26Risk_Bankruptcy.ipynb): `Customer_Stock_Lifetime_Value&Risk_Bankruptcy.ipynb`

### Other components

- **Yahoo Finance**
- **Client CSVs**

## Connections

- Yahoo Finance → Market Risk: provides prices
- Yahoo Finance → Bankruptcy Screen: provides fundamentals
- Market Risk → Stress Index: feeds indicators
- Stress Index → Feature Engineering: adds stress signals
- Client CSVs → Client Data: supplies CSVs
- Client Data → Cohort Analysis: feeds transactions
- Client Data → Feature Engineering: feeds client history
- Cohort Analysis → Feature Engineering: provides cohort context
- Feature Engineering → Survival Models: provides features
- Feature Engineering → CLV Regression: provides features
- Survival Models → Blended CLV: adjusts for survival
- CLV Regression → Blended CLV: provides revenue estimate
- Blended CLV → Business Dashboard: supplies client values
- Business Dashboard → CLV Scorecard: exports CSV
