GithubHelp home page GithubHelp logo

stuartgordonreid / comp-finance Goto Github PK

View Code? Open in Web Editor NEW
53.0 53.0 22.0 456 KB

This repository contains Python-based tools for Computational Finance. It is related to the Computational Finance blog run by Stuart Reid (www.stuartreid.co.za/blog).

License: GNU Lesser General Public License v3.0

Python 99.45% TeX 0.55%

comp-finance's People

Contributors

stuartgordonreid avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

comp-finance's Issues

Solution comparators

Currently I'm checking if a problem is a min or a max and then evaluating two or more solutions side by side to decide which is better ... I should instead,

  1. Overload the >, <, =, >=, <=, and != operators for the Solution abstract base class
  2. Decouple the Function (optimization problem) from the Optimizer
  3. Couple the Solution abc with the Function

That way in the Optimizer you would be able to directly compare solutions (or an instantiation thereof e.g. Particle) using equalities which will be a lot neater.

Decouple Quandl Data Downloader and Regression Analysis

The code for the Quandl.com data downloader currently sits in the same class as the Regression Analysis from StatsModels. This should be decoupled for re-usability. The QuandlSettings class should remain decoupled for flexibility.

Decouple regression analysis examples into Main

For readability purposes, the examples,

  • economics_example()
  • trading_example()
  • investing_example()

Should be decoupled from the RegressionAnalysis class and into a Main function for testing regression analysis. Also, some more examples should be added.

Numpy based solutions

Currently the abstract base class Solution is using standard Python lists. This should be refactored to use Numpy arrays instead to get an improvement in performance.

Remove local variable duplicate declarations

In the Regression Analysis package, I have duplicated the definition of variables which is unnecessary in Python (didn't know that at the time) i.e.

class A(object):
local_variable = [] <-- this is redundant
def init(self, local_variable)
self.local_variable = local_variable

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.