跳到主要內容

三種資料

 

成交前:

    OrderBook 上有交易所所有的掛單資料

    理論上最好的成交價格 midPrice = (bestAsk + BestBid) / 2

成交時:

    Trade Price, Volume ... (Tick Level)

    Trade Price 是實際上的成交價格

    用法:trade.price

成交後:

    根據 interval,累積一段時間的 Trade 資料,有兩種:

        1. onClosed() 

        2. 即時 Stream

    用法:kline.close


資料來源可能是 stream 也可能是 web api  , 看各交易所實作的情況

(註記:理論上所謂的成交前狀態應該不存在,那是薛丁格的狀態)


更新:Tick period = average time between changes in the mid-price.

Tick 事件有三種可能的發生原因:

    1. "BID" (one side is LO)

    2. "ASK" (one side is LO)

    3. "TRADE" (one side is MO, both sides are MO, two LO at the same price)

當 mid price 發生改變的狀態,一定會 emit tick event


更新:這邊的 tick 是 mid price 的話,那要 best bid/ask 改價格才會變動。

撤單下單在 best bid/ask 範圍區間內都會影響!

trade 把best bid/ask taken away 那也會影響!

但是假如 trade 不夠多,tick還是不變的!


留言

這個網誌中的熱門文章

Daniel Gross 寫的太好了

Daniel Gross 顯然是一位天才,他在 19 歲就創辦 Cue ,拿到 Sequoia 投資,是他們當時投資過最年輕的創業家,最後被 Apple 收購並在其中負責 ML。之後加入 YC,26 歲又成為 YC 最年輕的 partner,專注在 AI 領域。現在則成立自己的純 remote 天使基金, Pioneer 。 - A new Google     需要下  Query Operators 的搜尋引擎代表壞掉了 - The Bionic Market     給菁英用戶的思考與生產力工具的市場分析 - 10X: Metrics for Early Stage Startups     早期新創的 Growth 指標

Implicit Factor Model - A Cross-Sectional Regression Approach

  Equity Factor Models - Build one in R with a few lines of codes A step-by-step guide to build your own fundamental factor model using R and cross-sectional regressions Alexander Popov — unsplash Multi-factor models are a must-have for investors looking to understand their portfolio’s performance drivers . It helps explain the actual return of factors such as countries, sectors, and styles, independent of other factors’ effects. In this article, we will focus on the mechanics of such models, and how to  code them in R . We also introduce a visualization that lets you visualize the factor performance contributions overtime. A Factor Model, what’s that? A factor model also called a multi-factor model, is a model that employs multiple factors to explain individual securities or a portfolio of securities. It exists at least three types of factor models: Statistical factor models  — They use methods similar to  principal component analysis  (PCA). In these models, b...