Skip to content

Instantly share code, notes, and snippets.

@bkamins
bkamins / cont.jl
Created August 27, 2022 17:49
Julia implementation of a model of volatility clustering on financial markets
using DataFrames
using Plots
using Random
using StatsBase
function cont_run(time=10000, n=10000, λ=0.05, q=0.1)
r = zeros(time)
θ = zeros(n)
pchange = zeros(n)
for t = 1:time
@bkamins
bkamins / Manifest.toml
Last active November 21, 2020 18:44
Showcasing DataFrames.jl version 0.22
# This file is machine-generated - editing it directly is not advised
[[Adapt]]
deps = ["LinearAlgebra"]
git-tree-sha1 = "42c42f2221906892ceb765dbcb1a51deeffd86d7"
uuid = "79e6a3ab-5dfb-504d-930d-738a2a938a0e"
version = "2.3.0"
[[Artifacts]]
deps = ["Pkg"]
@bkamins
bkamins / large_df_demo.ipynb
Created April 11, 2019 12:37
Large data frame display demo
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@bkamins
bkamins / jobmarket.ipynb
Created March 6, 2019 13:47
A simple simulation model of job market
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@bkamins
bkamins / WFJ_20180905.md
Last active September 4, 2018 22:23
Support materials for Warszawskie Forum Julia meeting @ September 5, 2018

What is new in Julia 1.0

Bogumił Kamiński, September 5, 2018

Agenda

  1. Package management in projects
  2. Handling missing data
  3. Broadcasting
  4. Heterogeneous collections
@bkamins
bkamins / forestfire.jl
Last active August 20, 2018 14:54
JuliaLang @ SSC2018
using Random, Statistics, DataFrames
try
using PyPlot
global const HAS_PLOTS = true
catch
global const HAS_PLOTS = false
end
@enum Tree None Green Red Brown
@bkamins
bkamins / forestfire1.jl
Last active July 30, 2018 21:28
SSC2018 introduction to agent-based modeling in Julia
using Random
function setup(density)
[x == 1 ? 2 : rand() < density ? 1 : 0 for x in 1:251, y in 1:251]
end
function go(grid)
any(isequal(2), grid) || return true
for pos in shuffle!(findall(isequal(2), grid))
x, y = pos[1], pos[2]
@bkamins
bkamins / juliacon2018_presentation.md
Last active August 10, 2018 11:40
JuliaCon 2018: Asian option pricing using Monte-Carlo simulation using multi-threading in Julia

Asian option pricing using Monte-Carlo simulation using multi-threading in Julia

JuliaCon 2018

Bogumił Kamiński

http://bogumilkaminski.pl/about

rand is not thread safe

@bkamins
bkamins / BKAMINS_DSS2018.ipynb
Created June 7, 2018 18:32
Support material for presentation at DSS2018
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@bkamins
bkamins / design.r
Created April 9, 2018 09:38
Source codes for K. Growiec, J. Growiec, B. Kamiński: Social Network Structure and The Trade-Off Between Social Utility and Economic Performance, Social Networks, forthcoming
# K. Growiec, J. Growiec, B. Kamiński
# Social Network Structure and The Trade-Off Between Social Utility and Economic Performance
# Simulation experiment design generation file
library(randtoolbox)
size <- 65536
s_design <- sobol(size, 9, TRUE, 3, 4711, FALSE)
colnames(s_design) <- c("r", "p", "lambda", "sigma", "rho",