10.5.5 风险评估
在评估公司所涉及的风险时,通常考虑如下所示的几个因素。
- 公司规模:评估公司的规模,这可能影响稳定性和增长潜力。
- 公司复杂性:评估公司的运营、结构和业务模式的复杂程度,这可能影响运营效率和适应能力。
- 股份稀释:分析过去5年发生的任何股份稀释,因为这可能影响现有股东的所有权和未来每股收益。
- 审计师变更:检查最近的审计师变更,因为这可能表明存在潜在的会计或财务报告问题。
- 公司类型:考虑公司的类型,无论是初创公司、成熟企业还是特定行业部门,不同类型面临着独特的风险。
- 存货和应收账款:查看存货和应收账款与营收相比的持续增长模式,因为过度增长可能表明存在效率问题或潜在的流动性问题。
- 定性信息:综合之前使用ChatGPT模型提取的定性见解,如市场情绪、行业趋势、管理效果和竞争定位等。
通过全面评估这些因素,投资者可以更深入地了解投资公司所涉及的风险,并做出更明智的投资决策。
(1)请看下面的代码,根据市值(以美元计算)将公司分类为不同的规模范围,具体来说:
- 如果市值小于50,000美元,公司规模被归类为"Nano"级别。
- 如果市值介于50,000美元和300,000美元之间,公司规模被归类为"Micro"级别。
- 如果市值介于300,000美元和2,000,000美元之间,公司规模被归类为"Small"级别。
- 如果市值介于2,000,000美元和10,000,000美元之间,公司规模被归类为"Medium"级别。
- 如果市值介于10,000,000美元和200,000,000美元之间,公司规模被归类为"Large"级别。
- 如果市值大于200,000,000美元,公司规模被归类为"Mega"级别。
最后,打印输出了公司的规模分类。
market_cap_USD = equity_mkt * fx_rate_financial_USD
if market_cap_USD < 50 * 10 ** 3:
company_size = "Nano"
elif market_cap_USD < 300 * 10 ** 3:
company_size = "Micro"
elif market_cap_USD < 2 * 10 ** 6:
company_size = "Small"
elif market_cap_USD < 10 * 10 ** 6:
company_size = "Medium"
elif market_cap_USD < 200 * 10 ** 6:
company_size = "Large"
else:
company_size = "Mega"
print(f"Company Size {company_size}")
根据彼得·林奇(Peter Lynch)在他的著作《One Up on Wall Street(股市上的一次胜利)》中阐述的概念,将公司类型分为7种不同的可能性,其中单个公司可以符合其中一种或多种类型:
- 快速成长型(高增长)
- 稳健型(适度增长)
- 缓慢成长型(低增长)
- 衰退型(负增长)
- 转型型(亏损公司或负债公司,但有明确的扭转方式)
- 资产投资型(清算价值高于市值)
- 循环型(业绩受到商业周期影响)
(2)看下面的这段代码,用户与从文档中提取一些公司特征和数据,用于评估公司的风险,这有助于综合评估公司的风险情况,为投资决策提供参考。
complexity = company_complexity(doc, industry, company_size)
dilution = company_share_diluition(shares)
inventory = get_selected_years(data, "inventory", initial_year-1, final_year)
receivables = get_selected_years(data, "receivables", initial_year-1, final_year)
company_type = get_company_type(revenue_growth, mr_debt_adj, equity_mkt, liquidation_value, operating_margin_5y, industry)
auditor = find_auditor(doc)
print(f"Auditor {auditor}")
上述代码的实现流程如下所示:
- 通过 company_complexity 函数评估公司的复杂性,该函数可能会根据行业和公司规模返回一个复杂性评级。
- 使用 company_share_dilution 函数计算过去5年内股份的稀释情况,以评估股份的稀释程度。
- 使用 get_selected_years 函数从数据中提取过去几年的库存和应收账款信息,以评估公司存货和应收账款与收入的关系。
- 使用 get_company_type 函数根据营收增长、债务调整后的市值、清算价值、过去5年的营运利润率和行业等因素来确定公司的类型。
- 使用 find_auditor 函数从文档中找出公司的审计师信息。
(3)打印输出公司风险评估的结果,包括公司市值(以美元计)、公司规模评级、公司复杂性评级、股份稀释程度、收入、库存信息、应收账款信息、公司类型、审计师信息。这些信息提供了对公司风险情况的全面了解,有助于投资者做出更加明智的投资决策。
print("===== Risk Assessment =====\n")
print("MKT CAP USD: ", market_cap_USD)
print("company_size", company_size)
print("company complexity", complexity)
print("share dilution", round(dilution, 4))
print("revenue", revenue)
print("inventory", inventory)
print("receivables", receivables)
print("company_type", company_type)
print("Auditor", auditor)
print()
例如执行后会输出:
===== Risk Assessment =====
MKT CAP USD: 1538980340.0
company_size Mega
company complexity 4
share dilution 1.0732
revenue [136819000.0, 161857000.0, 182527000.0, 257637000.0, 282836000.0]
inventory [749000.0, 1107000.0, 999000.0, 728000.0, 1170000.0, 2670000.0]
receivables [18336000.0, 20838000.0, 25326000.0, 30930000.0, 39304000.0, 40258000.0]
company_type {'fast_grower': True, 'stalward': False, 'slow_grower': False, 'declining': False, 'turn_around': False, 'asset_play': False, 'cyclical': True}
Auditor Ernst & Young LLP We have served as the Company's auditor since 1999
(4)检索最近的文件并对其进行解析,然后生成一个包含摘要信息的DataFrame。对于每个文件,它提取了摘要信息并将其组织成DataFrame的行,其中包括文件类型、提交日期、摘要信息、摘要链接等。这有助于用户更轻松地查看最近文件的关键摘要信息,并进行进一步的分析和处理。
l = []
recent_docs = get_recent_docs(cik, doc["filing_date"])
for d in recent_docs:
print("##############")
print(d["form_type"], d["filing_date"], d["_id"])
print("##############\n")
if not mongodb.check_document_exists("parsed_documents", d["_id"]):
parse_document(d)
parsed_doc = mongodb.get_document("parsed_documents", d["_id"])
if not mongodb.check_document_exists("items_summary", d["_id"]):
sections_summary(parsed_doc)
summary_doc = mongodb.get_document("items_summary", d["_id"])
for k, v in summary_doc.items():
if isinstance(v, dict):
print(f"=== {k} ===")
for info in v["summary"]:
print(info)
if v["links"] is None:
v["links"] = [{"title":"", "link":""}]
for link in v["links"]:
l.append({
"ticker": ticker,
"created_at": datetime.datetime.now().date(),
"form_type": d["form_type"],
"filing_date": d["filing_date"],
"url": d["_id"],
"section": k,
"information": info,
"section_link": link["link"],
"section_link_title": link["title"]
})
print()
print("\n")
summary_df = pd.DataFrame(l)