Git Product home page Git Product logo

investment-manager's People

Contributors

darienhf avatar dohernandez avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

investment-manager's Issues

Create wallet daily report view

Create a daily report view that shows all the daily reports in a list, with a button to view report details.

Acceptance Criteria

  • Range date filter, with the last month as a default filter.
  • Start date should be require in the Range date filter.
  • End date is not require in the Range date filter. When end date is not defined, end date value should be set to now.
  • Columns of the list.
    • Date
    • Open capital
    • Close capital
    • Benefits. Format up-down narrow with money and percentage.
    • Button to show a popup with the details of the report.
  • Details report should look like:
    FireShot Capture 077 - Wallets - localhost

Add serialisation DBAL for domain events

We found that the serialisation done by doctrine using the serialize is not working as expected. We don't want to store the whole object when this is a reference from a doctrine entity, but this is happening.

We have introduced a function unburdenChangesDependencies to remove all the values of the attributes but not the id.

Now, we are thinking to use serialisation for the event to see how it goes.

Acceptance Criteria

  • Implement serialisation and unseralisation for the events by implementing a DBAL abstraction.

Fix/Improve aggregate root replay

Events are stored in the correct order when it is created, but there are some scenarios where the event is update and no new event is created.

Because of these scenarios it was detected that the aggregate it is not re-construct in the correct way. The hypothesis is the issue happens due to the replay event stay back in the stack instead of moving on top.

Fix wallet dividend projected month metadata

The month metadata stores the rate used to exchange the stock dividend into the wallet currency. This value is used later to update the wallet dividend projected when the rate is updated. Due to the bug reported in the issue #33 the current implementation is working, but as soon the bug is fix it will fail.

Acceptance Criteria

  • Store the rate used to exchange but the currencies.

Move set next dividend to create position

Move the logic to update next dividend to create position. At moment this logic seat in IncreasePosition but it belongs to create position.

Increase position will never update the stock.

Create Wallet daily snapshot

We want to track the performance of the wallet. For that, we want to generate and keep a daily snapshot of the wallets for the users.

Acceptance Criteria

  • Generate a daily wallet snapshot which the one later we can have a view similar to the following pic.

FireShot Capture 077 - Wallets - localhost

Refactor the use createdAt and updatedAt for a trait

Almost all entities in the application have the properties createdAt and updatedAt.

The idea is to refactor those properties into a trait. Also we wanna use the extension gedmo to update createdAt and updatedAt into the database; leaving the responsibility to the doctrine plugin.

Acceptance Criteria

  • Refactor the use createdAt and updatedAt for a trait.
  • Use plugin gedmo to update createdAt and updatedAt into the database.

Update stock next and to paid dividend

We have noticed the next and to paid dividend from stock is not updated. Those fields are only updated when there is an explicated sync stock dividend.

Acceptance Criteria

  • Update stock next and to paid dividend also when updated price happens.

Add indexes to tables

We have noticed there are some missing indexes in tables based on some of most used columns in search criteria.

Acceptance Criteria

  • Check all columns in search criteria and the require index to improve performance.

Fix update dividend in position

The value next dividend from the position is in $ value, but the position is €. Also, during dividend update, dividend that past the ex date (toPayDividend) is being updated too. Update dividend should not modify to pay dividend in the position, position maybe decreased after ex date but to pay dividend shall be paid before.

Acceptance Criteria

  • The value should be in €
  • To pay dividend should not be update.

Create snapshot for the aggregate root

More and more events are applied to the aggregate root, hence the aggregate root is becoming more fat and to load the aggregate root is being degraded it.

Aceptance Criteria

  • Implements an snapshot strategy to improve the performance of load.

Add serialisation DBAL for domain

We found that the serialisation done by doctrine using the serialize is not working as expected. We don't want to store the whole object when this is a reference from a doctrine entity, but this is happening.

We have introduced a function unburdenChangesDependencies to remove all the values of the attributes but not the id.

Now, we are seeing the result of the task #43, we want to migrate the domain objects too, so we can store all the information of the event in the payload without removing any data, ensuring we have the right value set at the time.

Acceptance Criteria

  • Implement serialisation and unseralisation for the domain by implementing a DataInterface.

Update javascript libraries

yarn watch
yarn run v1.17.3
$ NODE_ENV=development webpack --watch

webpack is watching the files…

Browserslist: caniuse-lite is outdated. Please run next command yarn upgrade

Update wallet dividend projected

Acceptance Criteria

  • When php bin/console app:update-exchange-rate is run, wallet dividend projected should be updated based on the current rate.

Change Data trait to hydrate based on properties

Data is a helper trait used to transform data coming from the DB into application data. To do that, Data uses the constructor to find the requires properties for the object inside the data coming from the data bases.

This was working fine, but it does not allow to change the payload by adding more properties due to the constructor has to change too.

To solve the problem we want to stop using the constructor and start to use the properties. This change will allow us to add or remove properties without braking change.

Using multithread in update commands

We want to get advance and implement multithreading by using the symfony The Process Component.

For that we have to find or implement a Process orchestrator to handle multi-process at the same time giving the ability to process in multithread multiples commands.

Exchange historical data

In order to reconstruct the wallet given a date, we need to have the exchange data for the given date.

Acceptance Criteria

  • exchange historical data.

Enable retry mechanism to update stock price.

During price update, some stock are not able to update its price because the scrapper fails with the following error:

 [ERROR] failed scraper update stock LMRK, error: Notice: Undefined offset: 0                                           ```

Enable re-try mechanism to avoid this error.

Fix update R. D. YIELD position

R. D. YIELD position is not being updated when the retention value is changed. To be able to see the updated value, it is required to run the command to update the stock dividend

php bin/console app:update-stock-dividend -e dev -w degiro -vv

Acceptance Criteria

  • Update R. D. YIELD position when the retention is updated.

Fix update dividend to use market currency

The dividend from the stock VET.TO should in C$ but it is in $ instead.

Acceptance Criteria

  • Fix the currency of the dividend of the stock based on the market currency.

Calculate Margin

Calculate Margin of the wallet based on the capital of the wallet and using the following example to determinate approximately the formula.

Los requisitos de riesgo neto de inversión aumentarán en degiro son del 25%.

¿Cómo puede afectar esto a mi cartera?En el siguiente ejemplo le mostramos una cartera diversificada de acciones para darle un ejemplo del riesgo neto de inversión. En la tabla “escenario actual” hemos calculado el riesgo de la cartera con nuestros requisitos anteriores de margen del 20%. En la tabla “nuevo escenario” se tienen en cuenta los nuevos requisitos del 25% para calcular el riesgo de la cartera.

  Escenario actual Nuevo escenario
Valor de Cartera € 6.250,00 € 6.250,00
FMM € -1.000,00 € -1.000,00
Valor neto de liquidación € 5.250,00 € 5.250,00
Riesgo € 1.250,00 € 1.562,50
Margen libre € 4.000,00 € 3.687,00

Acceptance Criteria

  • Use the example above to calculate the margin.

Create Weekly Report

Create a weekly report with the performance of the wallet compare with the past week and past year.

For example:

Stock Share Price 7 day Return 1 Year Total Return
Cboe Global Markets [0HQN] 91.41 9.8% -3%
Philip Morris International [PM] 73.46 6.2% -8.4%
Starbucks [SBUX] 63.05 -5% -14.4%
Visa [V] 151.85 -6% -3.1%
Western Digital [WDC] 38.21 -9.6% -23.5%
Two Harbors Investment [TWO] 2.42 -47.6% -80.5%

Acceptance criteria

  • Create a report similar to the one showed.

Update historical stock price

We want to have a weekly report, here the issue #29. Before to do it, we want to have a proper historical data.

Acceptance Criteria

  • Create a command to update stock price historical data.
  • Keep the lasted date updated so, next time the command is run, it resume from where the command end the last time.

Fix operation price from migrated operation

The operation migration run successfully, but it was noticed that the price was not migrated.

After some investigation was discovered that the price was missing too in the original source. There is another source that contains the price data.

Source: resources/import/operation.csv

Acceptance Criteria

  • Fix the operation price for those operations that were migrated using this source mentioned in the description.

Market historical data

In order to provide historical data for report propose, we need to have the market data for the given date.

Acceptance Criteria

  • Add historical option to the existing update price command to extend it functionality.
  • Refactor market price to use the new price-data structure.
  • Import market historical data.

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.