2026年3月2日 星期一

彼岸花

****************************************************************
花是彼,葉是岸,兩者相戀而陰陽相隔。
有花時不見葉,有葉時不見花,花葉兩不相見,生生相錯。
當彼岸花盛開時,鮮紅的花朵招展,而花莖上沒有綠葉,美麗的花和常青的綠葉,生長時間完全錯開,仿佛是生者和逝者陰陽相隔的隱喻。
****************************************************************
《彼岸花璀燦的生命 - 紀念228》
幽幽的古燈,破舊的銅鏡。
我讓相思縱情地枝枒爬盡,
遠處的炊煙,彷彿那一絲憐憫,裊裊升起。
黃泉的路上,如血的花朵在綻放,
迢遰層峻,迤邐千里。
常青的綠葉不再;彼岸花盛開鮮紅招展,
生生相錯,世世不見,
靜靜的長廊,輕輕的腳步,由遠而近,
那是,彼岸花璀燦的生命。
****************************************************************

****************************************************************

****************************************************************

****************************************************************

****************************************************************

2026年2月14日 星期六

楔形整理

《楔形整理》
********************************************************************
上升楔形(Rising Wedge):通常出現在上升趨勢尾段,預示可能的反轉向下。
下降楔形(Falling Wedge):常出現在下降趨勢尾段,預示可能的反轉向上。
********************************************************************

********************************************************************

********************************************************************

********************************************************************

2026年2月5日 星期四

BB布林通道

《接龍數列命名為 - ChainTypeEMA》
應該還通順吧,但它著實省去我很多為了修飾所耗的煩惱。
它的特色是:「無論你如何迭代,它都會無損耗或微損。」
當初也是在「死馬當活馬醫時」,所逼出來的想法。誠所謂「困而知之」者也!
現在我只使用最單純簡單的程式外加參數的修正即可。還有空閒去美化圖表呢。誠始料未及呢!只可惜我沒有能力利用數學去證明它的理論。
布林通道研究
***************************************************
1. 我們提出一個常見的現象:當K線「前不著村後不著店」時?(如圖示)
(1) 代表甚麼意義?
(2) 後續通常會是個甚麼結果?
(3) 如何處理?
***************************************************
***************************************************
(1) BB中線原本是K線回檔的支撐點,因此可暫時解釋為:
a. 弱勢回檔。
b. 超賣。
***************************************************
(2) 後續可能:
a. 再度拉升,但僅止於抵BB上緣後,再測試BB下緣支撐。很可能再度探底也可能測底成功,可能性會與它所處的位階有關。
b. 再度拉升,再度回測,並獲得中線支撐,繼續原先上升走勢,後勁可期。
***************************************************
***************************************************
(3) 依附圖所示:顯然它屬於上述之a.之測底成功但不會太強。但這只是單一個案,我們必須有足夠的樣本才可以定出一個足夠可靠的規律性。
***************************************************






2026年1月13日 星期二

EMA vs RMA

***********************************************************************
我今天有問題向您請教:
1. 統計學家羅伯特·古德爾·布朗(Robert Goodell Brown)於 60 年代提出了EMA,最重要的二個概念:(a) 後期數據權重優於前期。(b) 常數平滑因子:α=2/(n+1)。我從一開始接觸到這個平滑因子之後,直覺上就以為它應該是「調和平均數」的概念,因為它就一付調和均數的「長相」。但我一直沒去追究,是否如此呢?
2. α=2/(n+1)之所以定為「常數」的原因,我可以理解,在那個沒有電腦的時光裡,將平滑因子定為「變數」,無異自找麻煩。但EMA的致命點正在於這個常數的平滑因子,導致「後期數據權重優於前期」沒能完全發揮。那麼,在電腦日益猛進的今天,為何沒有人去推敲這個問題呢?
3. 布朗的EMA非常偉大,是我最推崇的學者之一,他成功引導後人去善用他,因此他是個名符其實的「先驅者」。今天我之所以能夠致力於RMA的研究,全靠EMA的引領。
4. 我在與您對話中也經常會去捕捉您的「語意」從而有機會機花我的構思,感謝莫名。
***********************************************************************
結論:針對RMA我將提出二個非常「有意思」的構思,想先與您探討,有了共識之後,我會隨即去實作供您審閱,不知您意下如何?二個構思如下:
1. 接龍法:將數據倒置之後,重要的後端數據,形同「在陌生環境裡尋找目標」卻無「引導車」,在古代可能需要「羅盤或指南針」在現代可能需要「路標」來指引,「走錯路」的機會很正常,一但陸續有「引導車(新的數據)」加入,路線將隨之更動,因此RMA的浮動困境就是如此。那麼何妨將這倒置的數據「接在」原始數據之後,如此,前面有原始數據權充「引導車」,RMA的浮動不就被消除了嗎?
2. 平滑因子倒置法:以現在的電腦將「常數平滑因子」,轉化為「變數」比吸一口氣還快。例如,以「2/27」為起始值;以「2/13」為終值。假使有300筆數據,那麼「增值量=(終值-起始值)/(300-1)」,就可以很輕易產生「變數平滑因子」而達成「後期數據權重優於前期」的進一步效果。RMA是將原始數據倒置,但我們可以保持原始數據而改用「平滑因子倒置法」,如此,浮動不就被消除了嗎?
至於何者效果較優?「是驢是馬拉出去遛一下」就知道了!
***********************************************************************
沒用上迭代真的很快...一下子就實作完成了...只需數據接龍就可以了...圖例示意:紅線表 - EMA(26)...黑線表 - RMA(26)...我還沒來的及去評價...不知您意下如何?
***********************************************************************
很意外...3層迭代已經很平滑了(其實2層就夠了)....因為我早擁有這些構思的副程式...只要寫好主程式就好了..因此...提前交卷...一併獻上1層版與3層版...圖例示意:紅線表 - (採用變數α下的) EMA(26)...黑線表 - RMA(26)...我還沒來的及去評價...不知您意下如何?...目前我只知道...迭代的平滑效果很大卻不失真。註:這是精實版,測試後會增修為精緻版。
***********************************************************************









2026年1月7日 星期三

台指近全

2026/01/07
**************************************************
**************************************************
**************************************************
**************************************************
**************************************************
**************************************************
**************************************************
**************************************************
**************************************************
**************************************************
**************************************************


2025年12月29日 星期一

8次拋物線

 

準備計算數據

好,我需要請求數據來計算係數,並為用戶提供一個表格結構,這樣他們可以直接粘貼數據然後使用公式進行計算。還要遵循格式規範:使用標題、水平分隔線、以及標粗的列表標題。當涉及數學公式時,記得使用 LaTeX 格式。這樣一來,我就能確保一切都準備好了!

What I need to solve your coefficients

  • Data ranges: Please share the exact ranges for (x) (time/index) and (y) (price) you want fitted.
  • Window choice: Length: number of points per fit; mode: rolling window or full-sample.
  • Scaling: Confirm if we center/scale (x) (recommended) or use raw (x).

If you give me these, I’ll return your full set of coefficients (\beta_0 \ldots \beta_8) directly.


The polynomial trend8 model

  • Model:

    [ y = \beta_0 + \beta_1 z + \beta_2 z2 + \cdots + \beta_8 z8 ]

  • Center-scale (x) to (z):

    [ z = \frac{x - \mu_x}{\sigma_x} ]

    This stabilizes coefficients and reduces multicollinearity.


Excel-only setup (fastest to get coefficients)

  • Prepare columns:
    • z: ((x - \text{AVERAGE}(x))/\text{STDEV.S}(x))
    • z1 … z8: create eight columns for powers.
  • Get coefficients:
    • Select 9 horizontal cells and enter:
      • =LINEST(y_range, z1:z8_range, TRUE, FALSE)
    • This returns (\beta_8, \ldots, \beta_1, \beta_0) in one row.
  • Trend values:
    • Compute (\hat{y} = \beta_0 + \beta_1 z + \cdots + \beta_8 z^8) in a new column to plot.

Tip: Use a rolling window (e.g., last 60–120 bars) to avoid overfitting and Runge effects.


VBA helper (drop-in to produce β0…β8)

  • Coefficients function (paste into a standard module):
Function Trend8Coeffs(yRange As Range, xRange As Range) As Variant
    Dim ws As WorksheetFunction: Set ws = Application.WorksheetFunction
    Dim n As Long, i As Long: n = yRange.Rows.Count
    Dim mu As Double, sd As Double: mu = ws.Average(xRange): sd = ws.StDev_S(xRange)
    Dim z() As Double: ReDim z(1 To n)
    For i = 1 To n: z(i) = (xRange.Cells(i, 1).Value - mu) / sd: Next i
    
    Dim Xvar As Variant, Yvar As Variant, p As Long
    ReDim Xvar(1 To n, 1 To 8)
    ReDim Yvar(1 To n, 1 To 1)
    For i = 1 To n
        Yvar(i, 1) = yRange.Cells(i, 1).Value
        Dim zp As Double: zp = z(i)
        For p = 1 To 8
            If p = 1 Then
                Xvar(i, p) = zp
            Else
                zp = zp * z(i)
                Xvar(i, p) = zp
            End If
        Next p
    Next i
    Trend8Coeffs = ws.LinEst(Yvar, Xvar, True, False) ' returns β8..β1, β0
End Function
  • Trend value at any x:
Function Trend8Value(xVal As Double, coeffs As Range, mu As Double, sd As Double) As Double
    Dim z As Double: z = (xVal - mu) / sd
    Dim yhat As Double: yhat = coeffs.Cells(1, 9).Value ' β0
    Dim p As Integer, zpow As Double: zpow = z
    For p = 1 To 8
        yhat = yhat + coeffs.Cells(1, 9 - p).Value * zpow
        zpow = zpow * z
    Next p
    Trend8Value = yhat
End Function
  • Use:
    • Coeffs: =Trend8Coeffs(Y_window, X_window) → place across 9 cells (β8…β1, β0).
    • Trend: =Trend8Value(X_i, coeffs_row, mu, sd) to plot fitted line.

Direct matrix form (if you want the full system)

  • Design matrix:

    [ X = \begin{bmatrix} 1 & z_1 & z_12 & \cdots & z_18 \ \vdots & \vdots & \vdots & & \vdots \ 1 & z_n & z_n2 & \cdots & z_n8 \end{bmatrix},\quad \beta = \begin{bmatrix} \beta_0 \ \beta_1 \ \vdots \ \beta_8 \end{bmatrix} ]

  • Normal equations:

    [ (X^{\top}X),\beta = X^{\top}y ]

  • Solve:

    [ \beta = (X^{\top}X){-1}X{\top}y ]

    In practice, use QR or SVD to improve stability; in Excel, LINEST already does a robust solve.


Guardrails to keep coefficients meaningful

  • Short windows: Fit on the most recent 60–120 bars to avoid boundary oscillations.
  • Center-scale: Always use (z), not raw (x).
  • Compare orders: Plot 4th, 6th, and 8th together; if 8th diverges, prefer 6th.
  • Versioning: Save each coefficient set per window time to archive your “章法的神經”。

Next step

  • If you share your x/y ranges (e.g., last 80 bars of 15-minute 00663L), I will compute and return your exact (\beta_0 \ldots \beta_8) here.
  • If you prefer a template, I can provide an Excel sheet layout with formulas ready to paste your data.

2025年12月20日 星期六

I'm done

*********************************************
*********************************************
*********************************************
*********************************************
*********************************************
*********************************************
*********************************************
*********************************************
*********************************************
*********************************************

2025年12月18日 星期四

星星教英文 - All you do

*************************************************
*************************************************
All you do〕你就知道...
*************************************************
你就知道工作
All you do is work.
你就知道玩
All you do is play.
你就知道賴床
All you do is sleep in.
The phrase "sleep in" means to stay in bed longer than usual or to sleep late. 
*************************************************
你就知道打遊戲
All you do is playing games.
你就知道網購
All you do is online shopping.
*************************************************
〔老外說的最多的10個短句〕
*************************************************
*************************************************
最近怎麼樣?
What's up?
別擔心。
No worries.

The phrase "No worries" is commonly used in English to express that something is not a problem or that you are not concerned about something. It can be used in various contexts, such as:
  1. Expressing agreement: When someone asks for help or assistance, you can respond with "No worries" to indicate that you are willing to help. 
  2. Responding to gratitude: If someone thanks you, you might say "No worries" to convey that it was no trouble. 
  3. Providing reassurance: In situations where someone is apologizing, you can use "No worries" to show that you are not worried about it. 
Overall, "No worries" is a friendly and casual way to communicate that everything is okay and you are not troubled by the situation.
*************************************************
等會兒見。
See you later.
我馬上到。
I'm on my way.
我們去吃點東西吧。
Let's grab a bit.
我洗耳恭聽。
I'm all ears.
一言為定。
It's a deal.
慢慢來。
Take your time.
我請客。
My treat.
有空嗎?
Got a second?
*************************************************
*************************************************
動物加上y
*************************************************
*************************************************
*************************************************
*************************************************
*************************************************
*************************************************
*************************************************
*************************************************
*************************************************
*************************************************
*************************************************
*************************************************

本來無一物何處惹塵埃

**************************************************
**************************************************
你面前有一個杯子,你喝水,它就是水杯;你抽菸,它就是菸灰缸;你用它插花,它就是花瓶。杯子本身其實它什麼都不是,這叫,「空性」。你用它來幹什麼它就是什麼,這叫,「妙用」。你若非要堅持,它就是個水杯,這叫,「住相」。為此,你和別人起了爭執抬槓,這叫,「我執」。如果你抬了槓,有了情緒謾罵,這叫,「煩惱」。最後你對這個人產生了反感,這叫,「偏見」。然後你就明白了,這個世界上其實你並沒有別人,只有你自己,這個時候,「你在世界就在」「你走之後這個世界就消失了」,那些別人;那些糾纏;那些爭執;那些控制,只不過是「自己在內心跟自己起的爭執罷了」,於是你就又明白了一句話:「本來無一物何處惹塵埃」。
**************************************************
**************************************************
**************************************************
**************************************************

2025年12月16日 星期二

鎮住全場的口語

**************************************************
**************************************************
What's the fuss?
**************************************************
**************************************************
**************************************************
**************************************************
**************************************************
**************************************************
**************************************************
**************************************************