Skip to main content

With the help of ChatGPT we develop a open-source python package,aiming at Narrating Accounting just using Python.在ChatGPT的帮助下,我们开发了这套python包,旨在用python进行会计叙事。

Project description

CPANLP🎺: Certified Public Accountant talks just Like a Coder

Talk is cheap ,show me the code

Narrating Accounting using Python Example from amazon financial report

sales increased 12% compared with fourth quarter 2021:

  • North America segment sales increased 13% year-over-year to $93.4 billion, or increased 14% excluding changes in foreign exchange rates.
  • International segment sales decreased 8% year-over-year to $34.5 billion, or increased 5% excluding changes in foreign exchange rates.
  • AWS segment sales increased 20% year-over-year to $21.4 billion.
sale1 = p.Sale(quarter="Q4",amount=93.4,unit="billion dollars",growth_rate=13%,year=2022,segment="North America")
sale2 = p.Sale(quarter="Q4",amount=34.5,unit="billion dollars",growth_rate=-8%,year=2022,segment="International")
sale3 = p.Sale(quarter="Q4",amount=21.4,unit="billion dollars",growth_rate=20%,year=2022,segment="AWS")
sales = [sale1, sale2, sale3]
total_sales = 0
for s in sales:
    total_sales += s.amount
    print(f"Segment: {s.segment}, Sale: {s.amount}")

print(f"Total Sales: {total_sales}")
logo

Narrating Accounting! using Python Developed by Cpanlp Intelligent Accounting Team (c) 2023 Github

PyPI - Python Version Downloads

Install & Import 安装和导入

Dependencies

  • scipy
  • numpy
  • pandas

For detailed installation instructions, see the documentation.

pip install cpanlp
import cpanlp as p

Features 主要功能

  1. Accounting Item 会计科目
gold_asset = p.Asset(account="gold", debit=1000,date="2023-01-01")
print(gold_asset.bubble)
  1. Information Asymmetry 信息不对称
info = p.AsymmetricInformation(sender="investor", receiver="company_A", message="I am very interested in investing in your business", hidden_information="I have a limited budget")
info.get_advantage()
  1. Entrepreneur 企业家
john = p.Entrepreneur(name="John Smith",age=30,wealth=100000,utility_function=0, experience=5,company=LLC("Apple","Electronics",1000000),entrepreneurship=Entrepreneurship(leadership=9.0))
john.strive_for_excellence()
  1. Strategy 策略
huawei = p.FinancialStrategy("huawei","defense",poison_pill(1000,0.1))

Accounting Language Decorator 会计语言装饰器:

@prob(probability=0.7) #Estimate 估计

@future_tense #Future Tense 将来时态

side_effects=["financial instability","loss of reputation","decreased employee morale"]
@with_side_effects(side_effects=side_effects)#Side Effects 副作用

Accounting Exception 会计异常:

if abs(percent_change) > 10:
  raise AbnormalFluctuation(stock_name, percent_change)

Module 主要模块:

Module Content
Abnormal 异象 Winner Curse赢者诅咒Bubble泡沫
Accounting Account 会计科目 Asset资产Liability负债Equity所有者权益Income收入Cashflow现金流
Business 业务 Main Business主营业务Capacity产能
${\color{blue}Contract合约}$ Agreement协议Arrangement安排MOU备忘录Commitment Letter承诺函Lease租约Loan Contract借贷合同Labor Contract劳动合同Financial Instrument金融工具
Cognitive 认知 BlackSwan 黑天鹅Grey Rhino灰犀牛Herd Behavior羊群效应Invisible Hand无形的手Revolving Door政商旋转门
Control 控制 Voting Power 投票权Commodity Control商品控制权Significant Influence重大影响
Culture 文化 Entrepreneurship企业家精神Craftsmanship工匠精神Business Philosophy经营哲学
${\color{purple}Decorator装饰器}$ Estimate预测Tense时态Importance重要性With Effects副作用Validator验证
Department 部门 Board Of Directors董事会Supervisory Board监事会
Economic System 经济系统 Digital Economy数字经济Physical Economy实体经济Market Economy市场经济Planned Economy计划经济
Entity 实体 LLC(Limited Liability Company)有限责任公司Partnership合伙企业Public Company公众企业SME(Small and medium-sized enterprises)中小企业Conglomerate 集团
Environment 环境 Economic Environment经济环境Industry Environment行业环境Credit Environment信用环境Market Environment市场环境
Event 事件 Acquisition并购Certification认证Grants补助Meeting会议Resignation离职Repurchase回购Personnel人事Registration注册Shares股份Lawsuit诉讼StockHoldingIncrease增持
${\color{purple}Exception异常}$ Abnormal Fluctuation异常波动Bubble泡沫Winner Curse赢者诅咒
Information 信息 Signal信号Speculative Information投机信息Asymmetric Information不对称信息
Incentive 激励
Institution 制度
Market 市场 Commodity货物Goods商品Market Structure市场结构
Person 个体 ${\color{red}Consumer消费者}$,Employee员工Entrepreneur企业家Manager经理Investor投资人Partner合伙人Shareholder股东Supervisor监管者Creditor债权人Auditor审计Beneficiary受益人Fiduciary受托人Craftsman工匠
Policy 政策 AccountingPolicy会计政策DividendPolicy股利政策
Project 项目
Pragmatics 语用 Promise承诺
Risk 风险
StakerHolder 利益相关者 Bank银行Government政府Media媒体Public公众Rating Agency评级机构
Scheme 图示 Ponzi Scheme庞氏骗局ESOP员工持股DebtRestructuringPlan债务重组
Strategy 战略 Long Term Strategy长期策略Financial Strategy财务策略
Tax 税法 VAT(Value-Added Tax)增值税Consumption Tax消费税Personal Income Tax个人所得税Corporate Income Tax企业所得税RealEstate Tax房产税TransactionTax印花税
Team 团队
Utility 效用

Accounting Gym-Env 会计强化学习环境

logo

Check out: https://cpanlp.com

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cpanlp-1.2.30.tar.gz (83.3 kB view hashes)

Uploaded Source

Built Distribution

cpanlp-1.2.30-py3-none-any.whl (136.5 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page