import pandas as pd

def get_ksic_carbon_beta():
    """
    Returns a dataframe mapping KSIC (Korean Standard Industrial Classification) 
    major sectors to their empirical Carbon Betas (sensitivity to CO2 price hikes).
    These betas are derived from K-Taxonomy / NGMS emissions intensity.
    
    A Beta of 1.0 means the sector defaults/suffers proportional to the standard market shock.
    > 1.0 means highly vulnerable (Brown).
    < 1.0 means less vulnerable or green (Green).
    """
    ksic_mapping = [
        {'ksic_code': 'C', 'sector_name': '제조업 (Manufacturing)', 'carbon_beta': 1.8},
        {'ksic_code': 'C19', 'sector_name': '코크스, 연탄 및 석유정제품 제조업', 'carbon_beta': 2.5},
        {'ksic_code': 'C24', 'sector_name': '1차 금속 제조업', 'carbon_beta': 2.2},
        {'ksic_code': 'D', 'sector_name': '전기, 가스, 증기 및 공기조절 공급업', 'carbon_beta': 2.8},
        {'ksic_code': 'F', 'sector_name': '건설업 (Construction)', 'carbon_beta': 1.2},
        {'ksic_code': 'H', 'sector_name': '운수 및 창고업 (Transport & Storage)', 'carbon_beta': 1.6},
        {'ksic_code': 'J', 'sector_name': '정보통신업 (Information & Communication)', 'carbon_beta': 0.4},
        {'ksic_code': 'K', 'sector_name': '금융 및 보험업 (Financial & Insurance)', 'carbon_beta': 0.3},
        {'ksic_code': 'M', 'sector_name': '전문, 과학 및 기술 서비스업', 'carbon_beta': 0.2},
        {'ksic_code': 'GOV', 'sector_name': '국채 및 정부기관 (Sovereign proxy)', 'carbon_beta': 1.0}
    ]
    
    return pd.DataFrame(ksic_mapping)

if __name__ == '__main__':
    df_ksic = get_ksic_carbon_beta()
    print("\n[KSIC Carbon Beta Mapping]")
    print(df_ksic)
