Skip to content

Instantly share code, notes, and snippets.

@kjytay
kjytay / correlation.py
Created February 6, 2016 18:03
A Tkinter program with an interactive matplotlib depicting correlations.
#!/usr/bin/env python
# Modified code from:
# - http://matplotlib.org/examples/user_interfaces/embedding_in_tk.html
# - https://gist.github.com/chappers/bd910bfb0ed73c509802
import matplotlib
matplotlib.use('TkAgg')
import numpy as np
from scipy.stats import pearsonr, spearmanr, kendalltau
@kjytay
kjytay / fundsupermart.py
Created February 5, 2016 02:26
This script takes a list of unit trust fund codes and scrapes their prices from fundsupermart.com.
# list of fund codes. user to key in whichever fund codes they want to look up.
fund_codes = [
("FSGBRE", "First State Glb Resources"),
("370248", "United Asian Bond Fund Class SGD"),
("UBGEMS", "United Emerging Markets Bond Fund"),
("PHP009", "Phillip Spore Real Estate Income CL A SGD"),
("PPMIPM", "Eastspring Investments MIP M")
]
#################################