GithubHelp home page GithubHelp logo

currency_parser's Introduction

Euro foreign exchange reference rates parser

Purpose

Repository created to keep track of requested task implementation.

Problem

For problem requirements check description.

Solution

Parser is a console application, but its logic can be extracted to controller logic if needed. Only pure Scala with ScalaTest is used to solve given problem.

Algorithm

Flow is as follows:

  1. Load CSV file to memory.
  2. Parse file so each record represents daily view of Currency Exchange where for one date we can see all currency exchange rates.
  3. Load records to memory (in-memory repository us used).
  4. Make necessary calculations to serve requested operations.

Operations:

  1. Allows an API caller to retrieve the reference rate data for a given Date for all available Currencies.
  2. Given a Date, source Currency (eg. JPY), target Currency (eg. GBP), and an Amount, returns the Amount given converted from the first to the second Currency as it would have been on that Date (assuming zero fees).
  3. Given a start Date, an end Date and a Currency, return the highest reference exchange rate that the Currency achieved for the period.
  4. Given a start Date, an end Date and a Currency, determine and return the average reference exchange rate of that Currency for the period.

currency_parser's People

Contributors

marcinkrykowski avatar

Watchers

 avatar  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.