Skip to content

Instantly share code, notes, and snippets.

View Kouhei-Takagi's full-sized avatar

Kouhei Takagi(髙木耕平) Kouhei-Takagi

View GitHub Profile
@Kouhei-Takagi
Kouhei-Takagi / EVA2nd-2.py
Created October 28, 2024 22:25
Correlation between NASDAQ price, Corn and Gold(Corr=0.945)
# データの取得ライブラリ
from yahoo_fin import stock_info as si
import pandas as pd
# 日付の取得ライブラリ
from datetime import datetime
# 相関関係の高い数式を見つけるライブラリ
from scipy.optimize import minimize
from scipy.stats import pearsonr
# モデルの訓練ライブラリ
from sklearn.model_selection import train_test_split
@Kouhei-Takagi
Kouhei-Takagi / EVA2nd.py
Created October 26, 2024 10:16
Correlation between NASDAQ price, Corn and Gold(Corr=0.945)
# データの取得ライブラリ
from yahoo_fin import stock_info as si
import pandas as pd
# 日付の取得ライブラリ
from datetime import datetime
# 相関関係の高い数式を見つけるライブラリ
from scipy.optimize import minimize
from scipy.stats import pearsonr
# モデルの訓練ライブラリ
from sklearn.model_selection import train_test_split
@Kouhei-Takagi
Kouhei-Takagi / validation.py
Created April 6, 2024 13:02
VSNasdaq... (Corr. 0.934)
import yfinance as yf
import pandas as pd
from scipy.optimize import minimize
from scipy.stats import pearsonr
class Data:
def __init__(self, symbol, start_date, end_date):
self.symbol = symbol
self.start_date = start_date
self.end_date = end_date
@Kouhei-Takagi
Kouhei-Takagi / validation.py
Last active April 6, 2024 13:23
Nasdaq vs Commodity Features(Corration 0.868)
import yfinance as yf
import pandas as pd
class Data:
def __init__(self, symbol, start_date, end_date):
self.symbol = symbol
self.start_date = start_date
self.end_date = end_date
def get_data(self):
@Kouhei-Takagi
Kouhei-Takagi / validation.py
Created April 6, 2024 10:26
Correlation Validation code
import yfinance as yf
import pandas as pd
class Data:
def __init__(self, symbol, start_date, end_date):
self.symbol = symbol
self.start_date = start_date
self.end_date = end_date
def get_data(self):
@Kouhei-Takagi
Kouhei-Takagi / main.py
Created April 6, 2024 09:24
Nasdaq vs Cacao * (Copper + Silver + Gold) - Sugar * Coffee (Corr. 0.8305)
import yfinance as yf
import pandas as pd
from scipy.optimize import minimize
from scipy.stats import pearsonr
class Data:
def __init__(self, symbol, start_date, end_date):
self.symbol = symbol
self.start_date = start_date
self.end_date = end_date
@Kouhei-Takagi
Kouhei-Takagi / main.py
Created April 6, 2024 08:11
Nikkei225 vs Cacao, Copper & Sugar price(Corr. 0.687)
import yfinance as yf
import pandas as pd
from scipy.optimize import minimize
from scipy.stats import pearsonr
class Data:
def __init__(self, symbol, start_date, end_date):
self.symbol = symbol
self.start_date = start_date
self.end_date = end_date
@Kouhei-Takagi
Kouhei-Takagi / main.py
Created April 4, 2024 23:52
VSNasdaq Corr 0.6597
import yfinance as yf
import pandas as pd
class Data:
def __init__(self, symbol, start_date, end_date):
self.symbol = symbol
self.start_date = start_date
self.end_date = end_date
def get_data(self):
@Kouhei-Takagi
Kouhei-Takagi / main.py
Created April 3, 2024 21:22
Nasdaq Correlation with Cacao, Copper and Sugar(Corr.0.64978)
import yfinance as yf
import pandas as pd
class Data:
def __init__(self, symbol, start_date, end_date):
self.symbol = symbol
self.start_date = start_date
self.end_date = end_date
def get_data(self):
@Kouhei-Takagi
Kouhei-Takagi / main.py
Created April 3, 2024 12:31
Nasdaq = Cacao + Copper - Sugar?3(Corr.0.636)(With ChatGPT4)
import yfinance as yf
import pandas as pd
class Data:
def __init__(self, symbol, start_date, end_date):
self.symbol = symbol
self.start_date = start_date
self.end_date = end_date
def get_data(self):