evan
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights New
    • Engagement control
    • Make a copy
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Note Insights Versions and GitHub Sync Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Engagement control Make a copy Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       Owned this note    Owned this note      
    Published Linked with GitHub
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    # 📊 Financial Statement Analysis with Large Language Models(金融報表分析與大型語言模型) ## 1. 🔍 研究概述 ### 1.1 研究目的 🎯 探討大型語言模型(特別是GPT-4)是否能成功執行金融報表分析,特別是在預測未來盈利方向方面的表現。 ### 1.2 研究背景 - 👥 金融分析師傳統上是金融市場的骨幹 - 🤖 LLM的出現可能改變這一現狀 - 🧐 需要了解LLM在金融分析領域的能力和局限性 - 💡 金融報表分析是一個複雜任務,需要理解、判斷和專業知識 ### 1.3 研究設計 1. 📑 使用標準化和匿名化的資產負債表和損益表 2. 🧠 指示GPT-4分析並預測未來盈利方向 3. 🚫 不提供任何敘述性或行業特定信息 4. 📊 比較GPT-4、人類分析師和其他機器學習模型的表現 5. 💰 評估基於模型預測的投資策略表現 > 注:研究設計的關鍵在於提供LLM相同的信息基礎,以公平比較不同方法的表現。 ## 2. 📚 數據和方法論 ### 2.1 數據來源 - 📋 Compustat年度財務數據(1968-2021) - 包含150,678個公司年度觀察值 - 來自15,401個不同的公司 - 📈 IBES分析師預測數據(1983-2021) - 包含39,533個觀察值 - 來自3,152個不同的公司 ### 2.2 數據處理 1. 📊 財務報表標準化: - 使用Compustat的平衡模型 - 確保所有公司年度觀察值具有相同的財務報表結構 2. 🕵️ 匿名化處理: - 刪除公司名稱和具體年份 - 使用相對年份標籤(如t, t-1)替代實際年份 3. 🧹 數據清洗: - 要求年末資產價值超過100萬美元 - 年末股價超過1美元每股 - 財政年度結束日期為12月31日 - 確保資產負債表等式成立 4. 📉 變量處理: - 所有連續變量在1%和99%水平上進行縮尾處理(winsorized) - 缺失的連續變量使用年度行業平均值進行插補 > 注:這種處理確保了所有公司年度觀察值具有相同的財務報表結構,防止模型通過特定格式或公司名稱識別公司。 ### 2.3 預測方法 1. 🤖 GPT-4模型: - 簡單提示:直接要求模型分析財務報表並預測 - 鏈式思考(Chain-of-Thought, CoT)提示:引導模型步驟化思考 2. 👥 人類分析師預測: - 使用IBES數據庫中的分析師預測 - 考慮1個月、3個月和6個月後的預測 3. 🖥️ 機器學習模型: - 逐步邏輯回歸(基於Ou and Penman, 1989的59個財務變量) - 人工神經網絡(ANN): - 使用與邏輯回歸相同的59個變量 - 另一版本僅使用資產負債表和損益表數據 ### 2.4 評估指標 - ✅ 準確率:正確預測的比例 - 🎯 F1分數:精確度和召回率的調和平均數 - 📈 AUC(曲線下面積):僅用於某些模型的評估 ## 3. 🧠 GPT模型的應用 ### 3.1 GPT提示設計 - 簡單提示:分析這些財務報表並預測未來盈利方向。 - 鏈式思考(CoT)提示: 1. 擔任金融分析師的角色 2. 識別財務報表項目的顯著變化 3. 計算關鍵財務比率(不限制需要計算的比率集) 4. 在計算比率時,先陳述公式,然後進行簡單計算 5. 對計算出的比率提供經濟解釋 6. 基於這些信息預測未來盈利是否可能增加或減少 7. 提供一段解釋預測理由的文字 8. 提供預測的幅度(大、中、小)和信心程度(0到1之間的分數) ### 3.2 GPT輸出分析 GPT的輸出包含三個主要部分: 1. 📊 趨勢分析 2. 🧮 比率分析 3. 🔮 預測理由 研究者對這些輸出進行了以下處理: 1. 📝 文本嵌入: - 使用BERT-base-uncased模型將文本轉換為768維向量 2. 🧠 基於嵌入的ANN模型: - 使用這些向量訓練新的預測模型 - 模型結構:輸入層(768維)、兩個隱藏層(256和64維)、輸出層(2維) 3. 📊 內容分析: - 計算比率分析中最常用的二元詞組(bigrams) - 分析預測理由中最常用的單詞(monograms) > 注:這種分析方法允許研究者量化GPT生成文本的信息價值。 ## 4. 📈 研究結果 ### 4.1 預測準確率比較 模型 準確率 F1分數 GPT (CoT) 60.35% 60.90% 人類分析師(1個月) 52.71% 54.48% 人類分析師(3個月) 55.95% 55.33% 人類分析師(6個月) 56.68% 56.85% ANN 60.45% 61.62% 逐步邏輯回歸 52.94% 57.23% ### 4.2 GPT vs 人類分析師 - GPT在預測准確率上顯著優於人類分析師 - GPT和人類分析師的預測是互補的,而非替代關係 - GPT在分析師可能表現不佳的情況下更有價值 ### 4.3 GPT vs 機器學習模型 - GPT的表現與專門訓練的ANN模型相當 - GPT在處理小型公司和虧損公司時表現更好 - GPT生成的文本包含有價值的信息,可用於進一步預測 ### 4.4 GPT預測能力來源分析 1. 排除記憶偏差: - GPT無法準確猜測公司名稱和財年 - 在訓練窗口外的測試中表現穩定 2. 文本信息價值: - 基於GPT文本的ANN模型達到58.95%的准確率 - GPT文本中的比率分析和趨勢分析最為重要 ### 4.5 投資策略表現 - 基於GPT預測的投資策略產生了顯著的超額回報 - GPT策略在夏普比率和阿爾法值上優於其他模型 ## 5. 結論與啟示 1. LLM(如GPT-4)在金融報表分析中展現出與人類專家相當甚至更優的能力 2. GPT生成的分析洞察是其預測能力的關鍵來源 3. LLM可能在金融決策中扮演更重要的角色,但需要進一步研究其實際應用 4. 這項研究為LLM在金融領域的應用開闢了新的可能性 ## 6. 研究流程圖 ```mermaid graph TD A[數據獲取] --> B[數據處理] B --> C[模型設計與訓練] C --> D[模型評估] D --> E[結果分析與比較] A --> |Compustat| A1[財務報表數據] A --> |IBES| A2[分析師預測] B --> B1[財務報表標準化] B --> B2[財務報表匿名化] C --> C1[GPT模型] C --> C2[分析師預測] C --> C3[機器學習模型] C1 --> |簡單提示| C1a[GPT without CoT] C1 --> |鏈式思考提示| C1b[GPT with CoT] C3 --> C3a[逐步邏輯回歸] C3 --> C3b[人工神經網絡 ANN] D --> D1[準確率評估] D --> D2[F1分數評估] E --> E1[GPT vs 分析師] E --> E2[GPT vs 機器學習模型] E --> E3[預測能力來源分析] E --> E4[資產定價測試] E3 --> E3a[記憶偏差檢驗] E3 --> E3b[文本信息價值分析] E4 --> E4a[投資組合構建] E4 --> E4b[夏普比率分析] E4 --> E4c[Alpha值分析] ``` 這個流程圖展示了從數據獲取到最終結果分析的整個研究過程。 ## 7. 關鍵金融詞彙解釋 1. 金融報表分析 (Financial Statement Analysis) 🔍 這是一種評估公司財務健康狀況的方法。分析師會審查公司的財務報表(如資產負債表、損益表等),以了解公司的盈利能力、償債能力和整體財務表現。 2. 資產負債表 (Balance Sheet) 📊 這是一份顯示公司在特定時間點的財務狀況報表。它列出了公司的資產(擁有的東西)、負債(欠的東西)和股東權益(公司的淨值)。 3. 損益表 (Income Statement) 💰 也稱為盈利表,這份報表顯示了公司在一段時間內的收入、支出和利潤(或虧損)。它告訴我們公司賺了多少錢,花了多少錢。 4. 盈利 (Earnings) 💹 指公司在扣除所有費用後的淨利潤。這是衡量公司財務表現的關鍵指標。 5. 每股盈餘 (EPS - Earnings Per Share) 📈 這是將公司的淨利潤除以流通股票數量得到的數值。它顯示了每股股票所代表的利潤,是評估公司價值的重要指標。 6. 財務比率 (Financial Ratios) 🧮 這些是通過比較不同財務數據項目得出的數值,用於快速評估公司的財務狀況。例如,流動比率衡量短期償債能力,資產周轉率衡量資產使用效率。 7. 市帳率 (Book-to-Market Ratio) 📚 這個比率比較公司的賬面價值和市場價值。低市帳率可能表示股票被高估,高市帳率可能表示股票被低估。 8. 槓桿率 (Leverage) 🏋️ 表示公司使用借貸資金的程度。高槓桿可能帶來更高回報,但也增加了財務風險。 9. 盈利波動性 (Earnings Volatility) 🎢 指公司盈利的不穩定程度。高波動性可能意味著公司的盈利不穩定,預測未來表現更困難。 10. 分析師預測 (Analyst Forecasts) 🔮 金融分析師基於公司財務報表和其他信息對公司未來表現(如盈利)的預測。 11. 隨機漫步模型 (Random Walk Model) 🎲 在金融中,這個理論認為股價的未來走向是隨機的,不能通過過去的價格變動來預測。 12. F1分數 (F1 Score) 🎯 這是衡量預測模型性能的指標,綜合考慮了精確度和召回率。完美的F1分數是1,最差是0。 13. 人工神經網絡 (ANN - Artificial Neural Network) 🧠 這是一種機器學習模型,模仿人腦的結構和功能,用於複雜的預測任務。 14. 夏普比率 (Sharpe Ratio) 📊 這是衡量投資組合表現的指標,計算超額回報與風險的比率。較高的夏普比率表示在承擔相同風險的情況下獲得了更高的回報。 15. 阿爾法值 (Alpha) 🏆 在投資中,阿爾法代表投資組合相對於市場基準的超額回報。正的阿爾法表示投資策略優於市場。 16. 長短倉策略 (Long-Short Strategy) ⚖️ 這是一種投資策略,同時買入(做多)預期會上漲的股票,賣空(做空)預期會下跌的股票,以期獲得市場中性的回報。

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password

    or

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully