Code Monkey home page Code Monkey logo

insynsregistret's Introduction

Insynsregistret

Build Status Download Javadoc License
Quality Gate Coverage Bugs Vulnerabilities Code Smells

Insynsregistret is a Swedish financial registry maintained by the Finansinspektionen (FI). It contains information regarding insider trading on Nasdaq Stockholm and Nordic Growth Market (NGM) and other trading venues.

This registry publishes information about the trading activities that have taken place during the day performed by the insiders and people close to them. The registry includes information concerning the position the insider involved in a certain trading activity has, what kind of activity it is (sell, buy or gift etc.), what kind of security that is traded and the quantity.

All insider trading is reported to FI, which publishes the data on a daily basis to this public database.

This Java library makes it easier to automate data extraction from Insynsregistret.

Examples

Search issuer

Find all issuer names that contains the word "fing" and prints it. Issuer can be used to refine the transaction search, see example below.

Insynsregistret registry = new Insynsregistret();

FreeTextQuery query = FreeTextQueryBuilder.issuer("fing").build();
registry.search(query).forEach(System.out::println);

Search persons discharging managerial responsibilities (PDMR)

Find the first PDMR name that contains the word "Carl". PDMR can be used to refine the transaction search.

Insynsregistret registry = new Insynsregistret();

FreeTextQuery query = FreeTextQueryBuilder.pdmr("Carl").build();
Optional<String> pdmr = registry.search(query).findFirst();

Search transactions

Get all insider trades published in the last 30 days, presented in English. Default language is Swedish.

Insynsregistret registry = new Insynsregistret();

TransactionQuery query = TransactionQueryBuilder.publicationsLastDays(30)
        .language(Language.ENGLISH)
        .build();

List<Transaction> transactions = registry.search(query)
        .collect(Collectors.toList());

Get all insider trades published in the last 30 days in Swedish Match (ISIN SE0000310336) and that is part of a share option programme.

Insynsregistret registry = new Insynsregistret();

TransactionQuery query = TransactionQueryBuilder.publicationsLastDays(30).build();

List<Transaction> transactions = registry.search(query)
        .filter(Transaction::isLinkedToShareOptionProgramme)
        .filter(t -> t.getIsin().equals("SE0000310336"))
        .collect(Collectors.toList());

A better way to achieve the same result as in the example above is to refine the search with an issuer query parameter to limit the search instead of filtering the search result. See next example with Hexagon AB.

Get the number of inside trades in Hexagon between given dates.

Insynsregistret registry = new Insynsregistret();

TransactionQuery query = TransactionQueryBuilder.publications(getFromDate(), getToDate())
        .issuer("Hexagon AB")
        .build();

long nofTransactions = registry.search(query).count();

Total value of all inside trades in company Loomis the last 30 days.

Insynsregistret registry = new Insynsregistret();

TransactionQuery query = TransactionQueryBuilder.transactionsLastDays(30)
        .issuer("Loomis AB")
        .build();

double total = registry.search(query)
        .mapToDouble(t -> t.getQuantity() * t.getPrice())
        .sum();

Java System Properties

Key Description Default
insynsregistret.parallel Process inside trade transactions in parallel. Values true or false. false
https.proxyHost The host name of the proxy server.
https.proxyPort The port number of the proxy server.

Download

Download the latest JAR or grab via Maven or Gradle.

Maven setup

Add repository for resolving artifact:

<project>
    ...
    <repositories>
        <repository>
            <id>apptastic-maven-repo</id>
            <url>https://dl.bintray.com/apptastic/maven-repo</url>
        </repository>
    </repositories>
    ...
</project>

Add dependency declaration:

<project>
    ...
    <dependencies>
        <dependency>
            <groupId>com.apptastic</groupId>
            <artifactId>insynsregistret</artifactId>
            <version>1.0.4</version>
        </dependency>
    </dependencies>
    ...
</project>

Gradle setup

Add repository for resolving artifact:

repositories {
    maven {
        url  "https://dl.bintray.com/apptastic/maven-repo" 
    }
}

Add dependency declaration:

dependencies {
    implementation 'com.apptastic:insynsregistret:1.0.4'
}

Insynsregistret library requires at minimum Java 8.

License

MIT License

Copyright (c) 2018, Apptastic Software

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

insynsregistret's People

Contributors

w3stling avatar

Watchers

 avatar

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.