viral32111 / FinanceTools.jl

Various tools to process financial time series

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Finance Tools

This is a package for Julia that provides various functions for processing financial time series data.

View on JuliaHub, or Julia Packages.

Documentation

Package contains various different tools to preprocess time series for machine learning and other uses.


DataFrames.DataFrame split_adjust( DataFrames.DataFrame df )

Description

Adjusts dataframes containing stock prices and volume if prices are unadjusted after potential stock merges/splits.

The source code for this function is in FinanceTools.jl.

Arguments

  1. DataFrames.DataFrame df To be filled out.

Returns

  1. DataFrames.DataFrame df To be filled out.

Example

julia> split_adjust()

# This results in...

fracdiff( Core.AbstractArray data, Core.Number d, Core.Number cutoff = 1e-3 )

Description

Calculates the fractional difference of a time series

The source code for this function is in fracdiff.jl.

Arguments

  1. Core.AbstractArray data Vector containing series to be differenced.
  2. Core.Number d Order of diffentiation, can be any positive real number.
  3. Core.Number cutoff Cutoff value for the binomial weights. Defaults to 1e-3

Returns

This function returns a vector with the same shape as input, efter being differenced.

Example

julia> fracdiff([0.:10.;], 0.5)

# This results in...
11-element Vector{Float64}:
 -4.1236855200362954e-16
  1.0000000000000002
  1.5
  1.8750000000000002
  2.1874999999999996
  2.4609375
  2.707031249999998
  2.9326171874999987
  3.1420898437499987
  3.3384704589843737
  3.523941040039061

fracdiff!( Core.AbstractArray data, Core.Number d, Core.Number cutoff = 1e-3 )

Description

In-place version of the "fracdiff" function.

The source code for this function is in fracdiff.jl.

Arguments

  1. Core.AbstractArray data To be filled out.
  2. Core.Number d To be filled out.
  3. Core.Number cutoff To be filled out. Defaults to 1e-3?

Returns

This function does not return a value.

Example

julia> fracdiff!()

# This results in...

License

This project is licensed under the MIT License, see LICENSE for more information.

About

Various tools to process financial time series

License:MIT License


Languages

Language:Julia 100.0%