gRPC is a high performant framework to exchange message for remote procedure call. It use protocol buffers for serializing structured data.

RESTful API is a very popular Web Service framework, which allow web developer to exchange json message through http call.

On the perspective of ease of use, REST is definitely easier than gRPC because gRPC requires the developer to define the message struct in the protocol buffer, and compile it to GO module with protoc compiler.

However, on the perspective of performance, gRPC is much faster than REST. Google Cloud run service can now serve both HTTP and gRPC…


Market Index consists of a list of major companies stock price. There should be a correlation between their prices. Here I would like to use the Machine Learning Model (LSTM) to predict the market index with the historical data of certain stocks.

Data Collection

I use the python package yfinance to get the daily stock price. I downloaded 3-year figures including “Open”, “Close”, “High”, “Low”, and “Volume”

Data Preprocessing

The target variable of the prediction is the Index ETL close price rate of return of the next day, which is defined as

target(t) = ( Close(t+1) - Close(t) )/Close(t) * 100%

Since the value…


Just learned the Oscillator of Moving average (OsMA) and RSI from the post. RSI is an useful indicator of trend and momentum. Inspired by that, I want to try to use that as the machine learning feature to predict the future stock return.

Calculation of RSI and its OsMA

Relative Strength (RS) and Relative Strength Indicator (RSI) can be computed from the Moving Average (MA) of the historical positive price difference (%) divided by that of negative price difference (%).

RS = (MA of positive difference) / (MA of negative difference)

RSI = 100–100/(1+RS)

Here is the code of Julia of the computation. …


西一4

歌羅西書 1:4 和合本

因聽見你們在基督耶穌裏的信心,並向眾聖徒的愛心,

希臘原文

source: https://bible.fhl.net

和合本中:在基督耶穌裏的信心,在基督裏是什麼意思?在一間屋裏我哋較容易明白,但基督現在不是以有形的在我們當中,如何在祂裏面?原來希臘文這個字01722有多個意思,而且經常出現在聖經裏。我選取了其中兩個比較相關的意思。


Introduction

The price of the Financial Derivatives will depends on its underlying asset, so 2 financial derivatives with the same underlying asset should behave similarly, i.e. correlated. In this article, I will investigate the correlation of 2 GOLD ETFs: (GLD and IAU), and then develop the trading strategy using their correlation properties.

GOLD ETF

To know more what is ETF and Gold ETF, please refer to https://www.investopedia.com/articles/investing/032116/what-relationship-between-gold-and-gold-etfs-gld-iau.asp

GLD and IAU are 2 popular Gold ETFs held by different Trusts. Both will track the price of Gold very closely. Therefore, we will expect their rate of return are following similar pattern.

Distribution analysis

  1. Download the Daily…

(和合本): 他被掛在木頭上親身擔當了我們的罪、使我們既然在罪上死、就得以在義上活.因他受的鞭傷、你們便得了醫治。

希臘文:

source: https://bible.fhl.net

這節聖經,和合譯本跟希臘原文,意思基本上一樣。第二句:「親身擔當了我們的罪」中的擔當,原文除了有擔當的意思,另外也有呈獻,特別是一個獻祭制度的術語,是帶上去祭壇的意思 (下面點2):


(和合本) 他對我說、我的恩典彀你用的.因為我的能力、是在人的軟弱上顯得完全.所以我更喜歡誇自己的軟弱、好叫基督的能力覆庇我.

(希臘文原文)

source: https://bible.fhl.net

有一個字,這節出現了兩次,第五節也出現了一次,就係軟弱(00769)


(和合本) 我靠著那加給我力量的、凡事都能作。

(希臘文原文)

source: https://bible.fhl.net

I just written the following article for the data science blogathon competition. It is about how to use Bayesian inference with Geometric Brownian Motion to simulate Stock Price. The implementation is by the Julia package “Turing.jl”. If you interested, you may take a look to support me.

https://www.analyticsvidhya.com/blog/2021/05/bayesian-approachgeometric-brownian-motion-in-stock-price-simulation/


(和合本) 我的 神必照他榮耀的豐富、在基督耶穌裏、使你們一切所需用的都充足。

(希臘文原文)

source: https://bible.fhl.net

動詞在希臘文是很重要的,這節經文只有一個動詞,就係充足(04137),其意思是使…滿足,fulfills ,使什麼得到滿足呢?就係我哋每一個需求丶需要的事,如何得到滿足呢?是照著神的豐富,照著意思解作依據丶按照,即係依據神的豐富來滿足我們的需求,並非緊緊合格或勉強足夠,而這個豐富是在榮耀裏和在基督耶穌裏的,我的理解是神藉耶穌基督來滿足我們的需要,而且是顯出神的榮耀,我哋祈禱的時候,奉耶穌基督之名向天父祈求,神應允,是耶穌成就左救恩的結果,因為神藉基督的寶血悦納我哋,而且也是顯出神的榮耀。

另外,充足滿足這個動詞是將來式,可能未必即時滿足,需要我哋去等待,但我們可以憑著這應許,盼望將來成就。

Matthew Leung

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store