- name
- risk-assessment-frameworks
- description
- Political risk indicators, institutional risk, corruption risk, democratic backsliding, early warning systems for Swedish political intelligence
- license
- Apache-2.0
# Risk Assessment Frameworks Skill
## Purpose
This skill provides comprehensive risk assessment methodologies for evaluating political, institutional, and democratic risks within the Swedish political system. It integrates international frameworks (V-Dem, Transparency International, Freedom House) with CIA platform's proprietary 50+ Drools risk rules to create systematic early warning capabilities for democratic backsliding, corruption, institutional erosion, political violence, and coalition instability.
## When to Use This Skill
Apply this skill when:
- ✅ Conducting democratic health assessments of Swedish institutions
- ✅ Identifying early warning signs of institutional erosion
- ✅ Assessing corruption risk at politician or party level
- ✅ Evaluating coalition stability and government sustainability
- ✅ Detecting democratic backsliding indicators
- ✅ Measuring institutional accountability effectiveness
- ✅ Analyzing political violence risk factors
- ✅ Creating risk-based intelligence priorities
- ✅ Benchmarking Sweden against international democracy standards
- ✅ Generating risk reports for stakeholders and media
Do NOT use for:
- ❌ Political persecution or targeting of legitimate opposition
- ❌ Fabricating risks to manipulate public opinion
- ❌ Undermining democratic institutions through false alarms
- ❌ Violating privacy or conducting surveillance without legal basis
## Risk Assessment Framework Architecture
### Integrated Risk Intelligence System
The CIA platform integrates four layers of risk intelligence to create comprehensive political risk profiles:
```mermaid
graph TB
subgraph "Layer 1: Data Collection"
A1["🗳️ Behavioral Data<br/>3.5M+ votes, attendance<br/>Productivity metrics"]
A2["💰 Financial Data<br/>World Bank, ESV<br/>Economic indicators"]
A3["📊 Democracy Indices<br/>V-Dem, Freedom House<br/>International benchmarks"]
A4["📰 Media Coverage<br/>Sentiment analysis<br/>Scandal tracking"]
end
subgraph "Layer 2: Risk Rules Engine (Drools)"
A1 --> B1[Behavioral Risk Rules<br/>24 politician rules<br/>12 party rules]
A2 --> B2[Financial Risk Rules<br/>8 corruption indicators]
A3 --> B3[Democratic Health Rules<br/>6 institutional rules]
A4 --> B4[Reputational Risk Rules<br/>4 scandal detection rules]
end
subgraph "Layer 3: Risk Aggregation"
B1 --> C1[Individual Risk Profiles]
B2 --> C2[Institutional Risk Profiles]
B3 --> C3[Systemic Risk Profiles]
B4 --> C4[Reputational Risk Profiles]
end
subgraph "Layer 4: Risk Intelligence"
C1 & C2 & C3 & C4 --> D["🎯 Composite Risk Score"]
D --> E[Early Warning Alerts]
D --> F[Risk Mitigation Strategies]
D --> G[Intelligence Priorities]
end
style A1 fill:#e1f5ff
style A2 fill:#e1f5ff
style A3 fill:#e1f5ff
style A4 fill:#e1f5ff
style B1 fill:#fff9cc
style B2 fill:#fff9cc
style B3 fill:#fff9cc
style B4 fill:#fff9cc
style D fill:#ffe6cc
style E fill:#ffcccc
style F fill:#ccffcc
style G fill:#e6ccff
```
## 1. Democratic Backsliding Detection
### V-Dem Integration Framework
The Varieties of Democracy (V-Dem) project provides the world's most comprehensive democracy measurement. The CIA platform integrates V-Dem indicators with behavioral data.
**V-Dem Core Indicators Tracked:**
- **Liberal Democracy Index** - Rule of law, checks on government
- **Electoral Democracy Index** - Free and fair elections
- **Participatory Democracy Index** - Citizen participation
- **Deliberative Democracy Index** - Quality of public discourse
- **Egalitarian Democracy Index** - Equal access to power
```python
from typing import Dict, List, Tuple
import pandas as pd
import numpy as np
from datetime import datetime, timedelta
class DemocraticBackslidingDetector:
"""
Detects democratic backsliding through trend analysis and threshold monitoring.
Based on V-Dem Early Warning of Democratic Decline (Edda) methodology
and combines international indices with CIA platform behavioral data.
"""
# V-Dem backsliding thresholds (0-1 scale)
CRITICAL_THRESHOLDS = {
'liberal_democracy_index': 0.50, # Below = autocratization
'electoral_democracy_index': 0.60, # Below = electoral manipulation
'participatory_democracy_index': 0.45, # Below = citizen disengagement
'deliberative_democracy_index': 0.50, # Below = discourse degradation
'egalitarian_democracy_index': 0.55 # Below = inequality deepening
}
def assess_democratic_health(self, country_code: str = 'SWE') -> Dict:
"""
Comprehensive democratic health assessment for Sweden.
Combines:
1. V-Dem historical trends (5-year analysis)
2. CIA behavioral indicators (parliamentary effectiveness)
3. International comparison (Nordic benchmarking)
4. Early warning signals (acceleration detection)
"""
# Fetch V-Dem data
vdem_query = """
SELECT
year,
v2x_libdem as liberal_democracy_index,
v2x_polyarchy as electoral_democracy_index,
v2x_partipdem as participatory_democracy_index,
v2x_delibdem as deliberative_democracy_index,
v2x_egaldem as egalitarian_democracy_index,
-- Component indicators
v2x_judicind as judicial_independence,
v2x_frassoc_thick as freedom_association,
v2x_freexp_altinf as freedom_expression,
v2x_elecoff as elected_officials_index,
v2xlg_legcon as legislative_constraints,
v2x_corr as political_corruption_index,
-- Backsliding indicators
v2x_regime as regime_type
FROM vdem_data
WHERE country_code = %s
AND year >= EXTRACT(YEAR FROM NOW()) - 10
ORDER BY year DESC
"""
vdem_df = pd.read_sql(vdem_query, self.connection, params=[country_code])
# Calculate trends (5-year linear regression slopes)
trends = {}
for column in vdem_df.columns:
if column not in ['year', 'country_code', 'regime_type']:
X = vdem_df['year'].values.reshape(-1, 1)
y = vdem_df[column].values
# Simple linear regression
slope = np.polyfit(X.flatten(), y, 1)[0]
trends[column] = round(slope, 4)
# Fetch CIA behavioral indicators
behavioral_query = """
SELECT
-- Parliamentary effectiveness
AVG(ce.overall_effectiveness_score) as avg_committee_effectiveness,
-- Party discipline (inverse of deviation)
AVG(100 - pd.avg_deviation_rate) as avg_party_discipline,
-- Oversight activity
COUNT(DISTINCT oa.document_id) as oversight_action_count,
AVG(oa.oversight_effectiveness_score) as avg_oversight_effectiveness,
-- Cross-party collaboration
AVG(cpc.collaboration_intensity) as avg_cross_party_collaboration,
-- Voting participation
AVG(100 - vbs.avg_absent_percentage) as avg_participation_rate
FROM committee_effectiveness ce,
party_deviation pd,
oversight_activity oa,
cross_party_collaboration cpc,
vote_ballot_summary vbs
WHERE pd.analysis_date >= NOW() - INTERVAL '2 years'
AND oa.created_date >= NOW() - INTERVAL '2 years'
"""
behavioral_data = pd.read_sql(behavioral_query, self.connection).iloc[0]
# Current V-Dem scores
current_vdem = vdem_df.iloc[0]
# Identify risks
risks = self._identify_risks(current_vdem, trends, behavioral_data)
# Calculate composite democratic health score (0-100)
health_score = self._calculate_health_score(current_vdem, behavioral_data)
# Early warning assessment
early_warnings = self._detect_early_warnings(trends, current_vdem)
return {
'country': country_code,
'assessment_date': datetime.now().isoformat(),
'current_scores': {
'liberal_democracy': round(current_vdem['liberal_democracy_index'], 3),
'electoral_democracy': round(current_vdem['electoral_democracy_index'], 3),
'participatory_democracy': round(current_vdem['participatory_democracy_index'], 3),
'deliberative_democracy': round(current_vdem['deliberative_democracy_index'], 3),
'egalitarian_democracy': round(current_vdem['egalitarian_democracy_index'], 3)
},
'5_year_trends': trends,
'behavioral_indicators': {
'committee_effectiveness': round(behavioral_data['avg_committee_effectiveness'], 2),
'party_discipline': round(behavioral_data['avg_party_discipline'], 2),
'oversight_effectiveness': round(behavioral_data['avg_oversight_effectiveness'], 2),
'cross_party_collaboration': round(behavioral_data['avg_cross_party_collaboration'], 3),
'participation_rate': round(behavioral_data['avg_participation_rate'], 2)
},
'composite_health_score': round(health_score, 2),
'health_classification': self._classify_health(health_score),
'identified_risks': risks,
'early_warnings': early_warnings,
'international_ranking': self._get_nordic_comparison(current_vdem)
}
def _identify_risks(
self,
current: pd.Series,
trends: Dict,
behavioral: pd.Series
) -> List[str]:
"""Identify specific democratic risks."""
risks = []
# Check V-Dem thresholds
for indicator, threshold in self.CRITICAL_THRESHOLDS.items():
if current.get(indicator, 1.0) < threshold:
risks.append(
f"CRITICAL: {indicator} below threshold "
f"({current[indicator]:.3f} < {threshold})"
)
# Check negative trends
for indicator, slope in trends.items():
if slope < -0.01: # Declining more than 0.01/year
risks.append(
f"WARNING: Declining {indicator} (trend: {slope:.4f}/year)"
)
# Check behavioral indicators
if behavioral['avg_committee_effectiveness'] < 50:
risks.append("Institutional dysfunction: Low committee effectiveness")
if behavioral['avg_oversight_effectiveness'] < 60:
risks.append("Accountability deficit: Weak oversight mechanisms")
if behavioral['avg_participation_rate'] < 85:
risks.append("Disengagement: Low parliamentary participation")
return risks if risks else ["No critical risks detected"]
def _calculate_health_score(
self,
vdem: pd.Series,
behavioral: pd.Series
) -> float:
"""Calculate composite democratic health score (0-100)."""
# V-Dem component (70% weight)
vdem_score = (
vdem['liberal_democracy_index'] * 20 +
vdem['electoral_democracy_index'] * 20 +
vdem['participatory_democracy_index'] * 10 +
vdem['deliberative_democracy_index'] * 10 +
vdem['egalitarian_democracy_index'] * 10
)
# Behavioral component (30% weight)
behavioral_score = (
(behavioral['avg_committee_effectiveness'] / 100) * 10 +
(behavioral['avg_oversight_effectiveness'] / 100) * 10 +
(behavioral['avg_participation_rate'] / 100) * 10
)
return vdem_score * 100 + behavioral_score
def _classify_health(self, score: float) -> str:
"""Classify democratic health."""
if score >= 85:
return "ROBUST_DEMOCRACY"
elif score >= 70:
return "HEALTHY_DEMOCRACY"
elif score >= 55:
return "FLAWED_DEMOCRACY"
elif score >= 40:
return "HYBRID_REGIME"
else:
return "AUTOCRATIC_REGIME"
def _detect_early_warnings(
self,
trends: Dict,
current: pd.Series
) -> List[str]:
"""Detect early warning signals of democratic decline."""
warnings = []
# Accelerating decline (second derivative)
declining_indicators = [k for k, v in trends.items() if v < -0.005]
if len(declining_indicators) >= 3:
warnings.append(
"EARLY WARNING: Multiple indicators declining simultaneously"
)
# Judicial independence warning
if (current.get('judicial_independence', 1.0) < 0.70 or
trends.get('judicial_independence', 0) < -0.01):
warnings.append(
"CRITICAL: Judicial independence erosion detected"
)
# Freedom of expression warning
if (current.get('freedom_expression', 1.0) < 0.75 or
trends.get('freedom_expression', 0) < -0.01):
warnings.append(
"WARNING: Press freedom and expression declining"
)
# Legislative constraints weakening
if (current.get('legislative_constraints', 1.0) < 0.70 or
trends.get('legislative_constraints', 0) < -0.01):
warnings.append(
"WARNING: Legislative oversight weakening"
)
# Corruption increasing
if trends.get('political_corruption_index', 0) > 0.01:
warnings.append(
"WARNING: Political corruption index increasing"
)
return warnings if warnings else ["No early warnings detected"]
def _get_nordic_comparison(self, current: pd.Series) -> Dict:
"""Compare Sweden to other Nordic countries."""
query = """
SELECT
country_name,
v2x_libdem as liberal_democracy_index
FROM vdem_data
WHERE country_code IN ('SWE', 'NOR', 'DNK', 'FIN', 'ISL')
AND year = (SELECT MAX(year) FROM vdem_data)
ORDER BY v2x_libdem DESC
"""
nordic_df = pd.read_sql(query, self.connection)
sweden_rank = nordic_df[
nordic_df['country_name'] == 'Sweden'
].index[0] + 1 if 'Sweden' in nordic_df['country_name'].values else None
return {
'nordic_ranking': f"{sweden_rank}/5" if sweden_rank else "N/A",
'regional_comparison': nordic_df.to_dict('records')
}
```
## 2. Corruption Risk Assessment
### Transparency International Integration
The CIA platform integrates Transparency International's Corruption Perceptions Index (CPI) methodology with behavioral indicators to assess corruption risk.
```java
@Service
public class CorruptionRiskAnalyzer {
/**
* Multi-dimensional corruption risk assessment.
*
* Risk dimensions:
* 1. Financial irregularities (unexplained wealth, conflict of interest)
* 2. Behavioral anomalies (voting patterns inconsistent with stated positions)
* 3. Network corruption (connections to sanctioned entities)
* 4. Transparency violations (disclosure failures, opacity)
* 5. Accountability evasion (oversight avoidance, question dodging)
*/
public CorruptionRiskProfile assessCorruptionRisk(String politicianId) {
String sql = """
WITH financial_risk AS (
SELECT
p.person_id,
-- Financial disclosure completeness
fd.disclosure_completeness_score,
fd.wealth_change_unexplained_ratio,
fd.conflict_of_interest_declarations,
-- Red flags
CASE WHEN fd.wealth_change_unexplained_ratio > 0.30 THEN 1 ELSE 0 END as wealth_anomaly_flag,
CASE WHEN fd.disclosure_completeness_score < 0.70 THEN 1 ELSE 0 END as disclosure_failure_flag,
CASE WHEN fd.conflict_of_interest_declarations = 0 AND fd.business_holdings > 0
GitHubで見る