-
Notifications
You must be signed in to change notification settings - Fork 0
/
commits.txt
588 lines (557 loc) · 55 KB
/
commits.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
11/15/2023
Fixing, refactoring, fifo triggers and PL
Allocation Trades UI : Bulk order and trade details linked to allocated trade via JSON&Dialog
DB - FIFO Triggers: Fifo triggers to for creation updated. Added restriction to add back traded transaction in order to ensure fifo sequence ;
DB && UI Creating acconting: Notification if there is no root depo account for given portfolio
Fixed currency validator => When currency list is obtained, all subscribers are notified and they trigger currency fileds validation
Trade form UI fixed issue with opening allocation tab and correctly requesting orders list for allocation adding status array for query
Reduced queries to get first opened Accounting Day
Entry Form UI: Fixed overdraft validator for entry created based on existed one. There was no need to exclude id of orginal entry from calculation
11/16/2023
Portfolio Tabs UI=> Created dynamic tab label. Portfolio code is included in the active tab label
Tree menu UI => slightly changed design and blocks Trades&Orders, Accounting have been exluded from favorite as hardore fix inside intiation function
Trade Table UI => default filter has been changed to multiFilter
Entries, Orders, Allocation Table UI => default filter has been changed to multiFilter
Orders Table => Fixed reloading and onChange behavior, taking into account table mode and the parent of the view
Entries Table UI => Blocked UI to modify trades entries linked to FIFO calculation
--------------------------------------------------------------------------------------------
11/17-18/2023
1|| Orders Creation DB function and UI => Blocked creation of new orders with oppositie direction to the exist ones. For examlple if for any given pair portfolio - secid of potential buy order there is a sell not-accounted order then DB function f_i_o_create_orders_by_mp will generate an error message. The main issue with implementing is to generate exception in postgres function and then use the same dataset one more time to insert new orders. Using SELECT INTO in WITH clause is forbidden and to avoid duplicate query the decesion is to create temp table to store portential new orders
2|| Orders Table UI = > added status filter for retrived dataset and status filter for complex search
11/20/2023
1|| Entry Form UI: => Fixed unavaible data about expected balance in disabled form, view mode. Disable instruction was moved to ngAfterInt lifecycle hook. thus all form data has been initiated before disabling controls elements
2|| Balance sheet UI:=> planned trunovers => Fixed DB function f_a_b_bcurrent_ledger_turnovers_balances_notclosed by adding missing '*' to properly calculate negative transactions
3|| Orders-Trades UI: => Option to book a new trade based on order data was added to orders table. Fixed creating bond trade. It was required to pass parameter to the trade form to run secidChange functions to add data regarding face value, faceunit and etc in order to calculate trade amount correctly
4___ Creating testing data to calculate time weighted rate of return
--------------------------------------------------------------------------------------------
11/21/2023
1|| Portfolios NPV historical data to calculate time weighed roi and build chart of portfolio value dynamic change => DB function created => Using balances dynamic data from function f_a_b_balancesheet_total_closed_and_notclosed() for given period we calculate portfolio npv for every date. Balances data from last closed acconting date (or from the start of the period if its closed date) to the end period copied to the temp table and is used to calculate portfolio positions (using lateral join) for every date from the period. Then using lateral join
we get closest market price for every position
2|| Market Chart UI => restored sorting order for retrived market data to build chart correctly
3|| Allocation Table (Portfolio Trades Tab) => For portfolio trades tab modying functions are closed like creating/deleting accounting or deletion of trade
11/22/23
1|| TW roi
2|| Opening date for new depo accounts. Fist opened accounting date is used as opening date for new depo accounts
3|| Balances closed till november and reconciled. Difference rounded to 2 digts
4|| UI Accounts form => added date opeining for modying and viewing
5|| Opening date updated according to the first entry transaction date by the given account
11/23/23
1|| AutoCompleteService created functionality to notify components about arriving of secid autocomplete list
2|| Account Form UI => Added updating of secid validity on receiving notification that secidList is ready
3|| Account Form UI => Implemented control element to modify date opening of account and modify backend accordingly
4|| Martket Prices DB function refactored (using lateral join and etc)=> As a result portfolio structure function was speeded up by 40%
11/24/23
1|| DB f_i_get_npv_dynamic_with_performance_data.sql => refactoring
2|| DB created function f_i_get_accured_interest_for_period_secidlist() to fetch coupon periods for every date with report period to calculate npv
3|| DB created function f_i_get_cross_ratesfor_period_currencylist() to fetch cross rate for every date with report period to calculate npv
--------------------------------------------------------------------------------------------
11/25-26/23
1|| DB Fixed functions: f_i_portfolios_balances_by_account_for_idportfolios.sql,f_i_get_accured_interests_for_portfolios.sql,f_i_get_cross_ratesfor_period_currencylist.sql,f_i_get_npv_dynamic_with_performance_data.sql
11/27/23
1|| DB Fix f_i_get_accrued_interest_for_period_second list and f_i_get_accrued_interests_for_portfolios. Coupon periods have been corrected. Report date have to be greater than start date since start_date equal to the end date of the previous period
11/28-30/23
1|| Creating compound correction rate to calculate time weighted return of investment taking into account all deposits and withdrawals during investment period
2|| DB v2f_i_get_npv_dynamic_with_performance_trio refactoring, debugging and reconcile data
12/1/23
1 || DB refactored v2f_i_get_npv_dynamic_with_performance_trio and as a result execution time for maximum load dropped from 7 sec to 1 sec
2 || Tested and Verified performance data generated by v2f_i_get_npv_dynamic_with_performance_two function
12/2/23
1|| Reconcile performance data
2|| UI Trade form => developed DB function f_i_get_cross_rate_for_trade to retrive current cross rate based on user choice of base ,quote and set by dafault cross currency. Rate is used as an indicator to reduce risk of manul error. Indirect rate calculated as 1/rate has been added in hint section of settlement rate filed to facilitate reconcile
3|| UI Currencies Table => Indirect rate has been inclueded in the table
3/12/23
1|| UI Trade form => indicative market price info and confirmation of diffrence more than 20%. Created DB function to retrive market price f_i_get_market_quote_for_trade.sql
2|| Fixed trades with testing trades with incorrect settlement and price Currencies
3|| Closed all balances till October
--------------------------------------------------------------------------------------------
4/12/23
1|| DB refactoring cross_rate functions and implementing option to evaluate dynamic portfolio perfomance in different currencies 978,826,156,810,756
2|| UI Account details form => refactored accounts date of opening validation based on min date as firt opened accounting day. Validation uses current date which could be in closed period until it modifed. After that event min validation moves to first opened accounting day
5/12/23
1|| DB function f_i_get_cross_ratesfor_period_currencylist has been finished and is being used to get cross rates set for report period
2|| DB updated functions PSQL_Quaries/f_i_get_npv_dynamic.sql and PSQL_Quaries/f_i_get_portfolios_structure_detailed_data.sql to retrieve only required cross currency rates and apply them correctly
3|| UI Table to track portfolios npv dynamic perfomance, roi = > editing draft of the table
6/12/23
1|| UI Table to track portfolios npv dynamic perfomance, roi = > fully implemented with complex search, dynamic currency symbol change, excel export and formatted data
2|| UI Chart Performance analysis => Time-Weighted Rate of Return => draft of the chart
--------------------------------------------------------------------------------------------
7/12/23
1|| UI Chart Performance analysis => Time-Weighted Rate of Return => draft of the chart
10-11/12/23
1|| UI Chart Performance analysis implemented:
Custom color model for cash outs/in,
Dynamic labels and tooltips populating based type of data and type of transfer (deposit or withdrawal)
Custom/dynamic yAxises: design depends on data series and current scale
Added MarkPoints for TWR line to show max,min and the latest value of perfomance rate
2|| UI NPV Dynamic Table => create draft
13/12/23
1|| UI NPV Dynamic Table => Implemented table with complex search and design patterns
2|| DB & UI Profit and Loss calculation =>
Fixed costs calculation for local bonds
Implemented costs and pl conversion according to the report currency value
--------------------------------------------------------------------------------------------
14/12/23
1|| UI Portfolio position => User allowed to retrieve position data passing date and report currency as parameters. The algoritm has been changed by replacing pattern of storing the whole dataset and filtering it accordingly with quering only nessesary live data
--------------------------------------------------------------------------------------------
15/12/23
1|| UI Portfolio details Tab => Added performance chart rendering for chosen portfolio onChange
2|| UI Clients details Tab => Added performance chart rendering for the first portfolio of the given client. User can chose other portfolios from the select list. Data for them has been preloaded
3|| UI Strategy/Model Portfolio details Tab => Added performance chart without any preloaded data. The goal is to provide investment manager with all needed tools in one tabGroup
--------------------------------------------------------------------------------------------
16/12/23 - 18/12/23
1|| DB&Model PL detail analysis => Created DB function f_i_get_pl_dynamic_with_npv.sql to provide data for detailed factor analysis of clients revenue. Function calculates realized profit and loss based on fifo data and unrealized profit/loss comparing current position evaluated by market price and costs of creating position retrieved from fifo data. An idea is to provide an UI to create chart showing the dynamic of portfolio revenue splitting it by separate instruments and graphicly demonstrating its contribution in final financial result of managment
19-20/12/23
1|| UI Performance Chart =>
Implemented stack area chart for revenue structure analysis in dynamic.
Chart:
Series are created dynamicly based on portfolio instrument list.
DataSets are aligned according to xAxis date series by adding nessesary array of zeros value before the actual data.
Legend items are sorted according to the order of areas in the chart
Created UI and API to fetch dataSet to draw a chart.
Realized complex filters data retrieve and export to excel for further manual analysis and etc
--------------------------------------------------------------------------------------------
21/12/2023
1|| UI Performance Chart Factor Revenue =>
Fixed aligning order of labels according to the logic of chart engine. Thus the chart is more readable. Labels take the place according to the time of appearing first income or loss and the final type of revenue: profit or loss as well
Made a custom tooltip with table splitting total pl by separate instrument contributions and added custom style
Chart has been added to portfolio's tab group. By default it demonstrates revenue factor analysis for the last three months and could be customize by the user if it's nessesary
22/12/2023 - 24/12/2023
1|| Managment Fees Backend: DB model and DB functions =>
Created db tables for fees calculation and processing
Created db functions to calculate managment fees and save calculation for futher processing
2|| UI Managment Fees => Created base UI draft table
--------------------------------------------------------------------------------------------
25/12/2023 - 26/12/2023
1|| UI Management Fees =>
UI splitted into two tables calculation and processing
Added default functionality: complex search and excel. excel export has been refactored
Created function to save prepared calculation in relevant table for further proccessing. User is able to see which calculations have been saved earilier and is notified only new calculation will be saved.
Created UI function to show detailed data of calculations or grouped by portfolio
Created delete stored calculations function for selected items.
DB trigger on delete created to verify because user is only allowed to delete calculations without accounting
--------------------------------------------------------------------------------------------
27/12/2023 - 28/12/2023..
1|| UI&Backend Fees proccessing =>
Added accounting scheme to process fees accounting.
Accounting scheme consists of three entries. A fee amount is transferred to transit account and then distribute it between net profit and taxes due to be paid
Implemented basic functionality to store profit tax rate and use it for taxes calculation
Developed function to create accounting related to the fees transaction using accounting schemes stored in DB and which could be customized if it is nessesary
Within accounting creation function reference created between fees transactions and entry corresponding to the client account
Used forkjoin operator and other RxJS functions
2|| UI Confirm dialog has been refactored
3|| Minor fixing
--------------------------------------------------------------------------------------------
29/12/2023 - 30/12/2023
1|| UI&Backend Fees proccessing =>
Changed type of reference between accounting and fee calculation transaction. New reference contains array of entries assosiated with the calculation.
Developed DB function to delete accounting linked to the calculations and updating corresponding fees calculations
Add UI to delete acconting for fees calculations and calculations
2|| Minor fixing (entries list complex search by entry type fixed)
--------------------------------------------------------------------------------------------
1/1/2024 - 3/12/024
1|| UI Fees processing => Added function to show list of created entries linked to the saved fee calculation
2|| UI entries list => Implemented option to retrieve list of entries based on array of entries ids passed as a parameter
DB function edited by adding new parameter and changing query conditions respectively
Node JS changed logic to treat array parameters
3|| UI&Backend Fees proccessing => Implemented option to set acconting date for fee entry transactions
Added datepicker with minDate restriction as MIN(firstOpenedAccountingDate||MAX(saved fees calculations in the table)). Thus the accounting could be created not earilier than the last date in the calculation period
Accounting date information has been added in DB functions which are responsible for updating/removing reference between fee calculation row and entries generated
4|| UI entry form fixing => Fixed overdraft overriding status
--------------------------------------------------------------------------------------------
5/12/2024 - 8/1/2024
1|| UI & DB Entries Table =>
Added function to delete bulk of entries
Refactored UI design and ts
Refactored logic of allowing manual editing of acconting entry => Each entry group has boolean switch (DB table) which can exclude auto-generated entries from manual corrections to ensure data consistency
2|| UI & DB Fees proccessing table => Current account balance and calculated balance after fees deduction have been added to the UI table
DB: new function is created to calculate current account balances based on portfolio codes and date as parameters.
UI has been updated. Account balances upload on two events: fees dataset has been reloaded or acccounting date has been changed
--------------------------------------------------------------------------------------------
9/1/2024 - 10/1/2024
1|| UI Fees proccessing table =>
User notification about potential overdraft after fees deduction has been added to the accounting creation pipe. User is able to confirm overdrafts or cancel entries generation.
2|| Performance Fees =>
Created calculation model in excel
DB functions created:
f_f_calc_performance_fees - To calculate performance fees for given portfolios list and for given period
f_f_get_performance_fees_schedules - To get performance fees schedules, rates, hwm and other data needed for calculation
f_i_get_deposits_withdrawals_per_portfolios_on_date - Function to get all non trades related cash movements to compute PnL
3|| Pnl Data reconcilation =>
corrected pnl data on 16 sep 2023. Incorrect data was left after fifo implementation
changed type of early testing transactions to deposit and withdrawals. transactions were left after swift stp implementation
--------------------------------------------------------------------------------------------
11/1/2024 - 13/12/2024
1|| DB&UI Deducted fees (management, performance) are included in UI portfolio positions detailed data table.
Amount of fees is taken into account when PnL is calculated.
Created Db function f_i_get_deducted_fees_per_portfolios_on_date in order to obtain amounts of fees deducted.
New function has been added to middleware layer of getting portfolios data to show client statament
2|| High-Water Mark perfomance fee =>
High Water Mark(HWM) option has bee added to DB function f_f_calc_performance_fees, which calculates perfomance fee
HWM is saved for every calculation and it is changed when PnL reaches new max. New calculation gets the latest HWM and evaluates PnL above it as a subject to fee deduction
HWM has been added to fee schedules function to calculate new fees based on the latest HWM
3|| Performance Fee UI & DB =>
Created DB function to insert new calculations in the dfees_transactions table
Created separate table component to calculate perfomance fees
Created separate table component to process perfomance fees
4|| Performance Fees Accounting => Created accounting schemes to process perfomance fees
5|| UI & ML Ledger Accounts Form => exposed dateOpening field for editing. All relevant validation has been applied
--------------------------------------------------------------------------------------------
14/1/2024 - 15/1/2024
1|| Done: Check managemnt fee calculation when rate has been changed during period
2|| * Fix - Null NPV for current date from f_npv_dynamic
Fixed - historical period for exchange rates has been increased upto 60 days
The better way is to upload exchange rate more frequently
3|| Done: Check perfomance fee calculation when rate has been changed during period.
Best and correct approach is to 'close' performance fee period by calculating an amount of fee on the last date of the period. Fee amount without hurdle rate doesn't depend on the period length
4|| Fixing =>
Performance and Management fee corrected removing saved calculations and while processing removing fees with accounting
Performance Fees based on entries type have been added to detailed position table
5|| DB creating performance fee transactions =>
Created trigger which prevent creating new calculation before the date of the last calculation
6|| Hrudle rate implementation => Draft
--------------------------------------------------------------------------------------------
16/01/2024 - 19/01/2024
1|| UI & DB Fees Dictionary Table =>
Created table of fees with child tabele of schedules
2|| Created service to notify child schedule table that it was opened and to retrieve data if its nessesary. Thus schedules are requested from DB only if user is interested in them and DB workload has been Reduced
3|| AutoCompleteService - ModelPortfolios Pipe =>
ModelPortfolios pipe with exhaustMap has been added in order to avoid multiple request to DB for the same ModelPortfolios autocomplete list
Service functions using subject-observable pattern have been created to provide subscribers with requested list when it is ready
4|| UI & DB Forms for FeeMainData and FeeSchedulesData =>
Two forms have been created to provide UI for updating fees dictionary data (schedules and main data)
Middleware functions and services have been added to modify fees data
In order to avoid unnecessary workload to DB data returned modified data have been used to update Tables DataSource respectivly
5|| Fixing
--------------------------------------------------------------------------------------------
20/01/2024 - 23/01/2024
1|| UI & DB Portfolios and linked fees schedules Table =>
Interface uses portfolio table and show as child table fees schedules linked to the selected portfolio. Child fees schedule table has its own child table which allows to get info about fee schedules ranges and etc
2|| UI & DB Form to assign fees schedules to client portfolios and modify created data =>
Form allows to create/update/delete links between client portfolio and fee schedules. Form shows fee schedules ranges for the selected fee in readonly mode as reference info
3|| Minor file names fixing
--------------------------------------------------------------------------------------------
24/01/2024 - 25/01/2024
1|| DB Validation Fees Schedules ranges insert|update=>
Created DB trigger to prevent schedules ranges overlapping existing ones
2|| DB Validation linking between client portfolios and fees schedules insert|update=>
Created DB trigger to prevent links with overlapping applying periods for given portfolio and fee type (Performance/Managment)
3|| DB Validation preventing fees main data modifying if there are created calculations based on it =>
Created DB trigger to prevent updating dfees_main if there are rows with fee's id in the dfees_transactions
4|| DB Validation preventing fees schedules ranges data modifying if there are created calculations based on it =>
DB trigger on dfees_schedules has been updated to verify there are no rows with main fee's id in the dfees_transactions
5|| Fee calculations deletion fixed
--------------------------------------------------------------------------------------------
26/01/2024 - 28/01/2024
1|| DB Validation preventing link portfolio <=> fees schedule modifying if there are calculations created based on it=>
DB trigger on the table dfees_objects has been updated to allow modify only period_end field and on condition old or new value not less than last calculation saved in table dfees_transactions
2|| UI Fee Dictonary Table => Added function to show a list of portfolios attached to the selected fee schedule
3|| Performance Fee DB => Fixed multiple ranges calculations for performance fee => One range is taken based on amount of profit exeeding high water mark value
--------------------------------------------------------------------------------------------
29/01/2024 - 3/02/2024
29/01/2024 - 3/02/2024
1|| UI&DB FIFO detailed reporting =>
Created DB function f_fifo_select_all_trades to select nessesary fifo transactions. The function accepts price range, qty range, date range, lists of portfolios, secids, trades ids as filter parameters. Used new pattern when filter is ignored when its value is null and are used ranges in where clause. Added index based on order by statament
Created UI table to show FIFO transactions with option to request data using complex search with the same parameters as in DB function. Used class condition on rows to apply different style to close and open transactions.
Refactored using of ranges as search parameters
Refactored using of chiplists as search parameters. Got rid of additional array and reduce functions to the chiplists. HTML template were edited accordingly
2|| UI Portfolio Form =>
Added table with fees linked to the portfolio with option to edit them
Summary Tab received data regarding current PnL, NPV and Fees via service and displays it within the form when it's opened via menu tree
3|| Common form to render JSON result of db request has been refactored =>
Used custom json transform procedure to populate form and added function to export result in excel format. Changed from style in HTML template
4|| Middleware server logging => slightly changed logging data message
5|| Middleware common functions => function to trasfrom arrays according to its type for get requests (when numbers arrives as strings) was moved to shared module
--------------------------------------------------------------------------------------------
4/02/2024 - 5/02/2024
1|| FIFO positions (portfolios) on date reporting =>
Created DB function f_fifo_get_cost_pl_detailed and summary.sql to select nessesary fifo positions. The function accepts report date (if omitted by default current date is taken), list of portfolios, list of secids as filter parameters. The function provides with trades details remained in the fifo position on the requested date and demonstrates aggregated position data as well
Created UI table to show FIFO positions(aggregated position and trades included in it) with option to request data using complex search with the same parameters as in DB function.
--------------------------------------------------------------------------------------------
6/02/2024-8/02/2024
1|| Store histrory of a strategies changing structure DB =>
Created new DB table public.dstrategies_global_structure_history to store historical data of model portfolio structure changing. Table is a replica of the main table with additional fields to keep track of changing (user, time, type).
Implemented new trigger trg_f_i_dstrategies_global_structure_history.sql to create historical transactions when data in the main table has been modified. Every update transaction creates to two transactions in the history table: one contains new data and the other old data (before update). Delete and Create make only one transaction with the respective type
Added new DB function f_i_model_portfolios_select_mp_structure_for_accounts.sql to retrieve historical data in order to be presented in th UI
2|| UI Strategy changing history table => Created table component AppStrategyStructureHistTable to show historical data. Updated middleware layer and etc
3|| UI Strategy Form => Added strategy changing history table to the main strategy form. History is retrieved based on strategy id and updated onChange
4|| UI show snapshot of historical model portfolio on a given date =>
Using Main Strategy Form user is able to view historical model portfolio on the requested date and diffrence between weights on the requested date and current positons.
Function has been created without requesting data from DB. All data is beeing exchanged between components using services, streams and observables. Nessesary historical data is beeing trasferred from history table to the strategy form where it is porcessed and child structure table is updated.
Current data is stored inside component and a user is able to restore it witout requesting DB
--------------------------------------------------------------------------------------------
09/02/2024- 11/02/2024
1|| Transaction Types Dictionary UI&DB =>
Table component AppaIAccTransactionTypesTable has been created to retrieve/modify data regarding Transaction Types
Form component AppAccTransactionTypesFormComponent has been created to modify Transaction Type. Transaction Type must be unique by combination of type and code. User is able to block certain transaction type from manual editing. The option is introduced to protect integrity of data generated automatically and which is usually dependant on other axiuallary tables
2|| Accounting related interfaces have been transferred to the separate file. All dependant components and services have been updated accordingly
3|| Any type refactoring => Started getting rid of any type and replace it with correct types
--------------------------------------------------------------------------------------------
12/02/2024 - 17/02/2024
1|| Accounting schemes UI & DB =>
Created DB table bcSchemesParameters to store all parameters which could be used to create new accounting schemes. List of parameters is determined by function responsible for handling given buisness process. A parameter is similar to an api variable which is replaced by real value from business object when function is executed by the user
Introduced new object - "Process" and created respective DB table bcSchemesProcesses. Process object is used to make a link between given buisness process (function/module responsible for it) and list of parameters availble for the process
Create new table component AppAccSchemesParamsTable to show all availble parameters for the given process. The component is availble in the form of modify acccounting scheme. User can copy parameter to the clipboard by making a double click on it.
Table component AppAccSchemesAL_Table has been introduced to retrieve/modify accounting account schemes data (entries stored bAccountTransaction and affect clients accounts)
Form component AppAccSchemesAL_FormComponent has been created to modify accounting account schemes.
Table component AppAccSchemesLL_Table has been introduced to retrieve/modify accounting ledger schemes data (entries stored bLedgerTransactions and don't affect clients accounts)
Form component AppAccSchemesLL_FormComponent has been created to modify accounting ledger schemes.
Parameters are added to the scheme in the format of ${parameter_name:raw}. Parameters could be used to customize entries attributes such as entry's details, entry amount, date and accounts corresponding.
There are two options to set the accounts corresponding in the accounting scheme. User can choose/set static account number from the existed accounts or insert a parameter linked to transaction's accounting objects. For example, client cash account is available through ${pAccontId} parameter while clients trades are being processed
Every process id is linked to the scheme id. All transactions have to be generated during the function exuction of the given process must have the same scheme id inside accounts related schemes and inside ledger schemes as well. The function retrieves all accounting schemes with the process's scheme id from bLedgerTransactions and bAccountTransaction
Implemented UI to retrive account number by id inputed by a user. If account hasn't been found then text input stored since text pattern could be used as parameter in accounting scheme and be populated by respective module while entries are created
New parameter counterparty code has been added to the api of SellTrade/BuyTrade acconting process
2|| Accounting schemes interfaces have been transferred to the separate file. All dependant components and services have been updated accordingly
3|| Any type refactoring => Refactored any type in allocation.service.ts
4|| Rewrite cached data when it has been changed => Introduced new function to the indexDB.service.ts to update cache data (replace cache with up to date snapshot). New function is used to update transactions types cached when user updates respective data
--------------------------------------------------------------------------------------------
19/02/2024 - 26/02/2024
1|| Refactored functionality to load currency rates from site of russian central bank:
The function has been moved from the component to the currency service
The function has been rewritten using RxJS library. All nested conditions have been replaced with RxJS operators inside the pipe
Timeout has been set for respective http get request and add hadler to process threpassing of the limit
In order to prevent a express server crash, when cbr site is unreacheable due to a bad or no connection, error hadler has been connected to the http get request. Error hadnler console log an error and send error to the client UI where is handled accordingly
Refactored UI to make it more intuitive
2|| Refactored any type to the secure ones in the following components:
allocation-table.component.ts,
orders-table.component.ts,
swift-items-table.component.ts,
swifts-incoming-table.component.ts,
accounting-trades.service.ts,
allocation.service.ts,
handling-entry-processing.service.ts,
tree-menu.service.ts,
trades-service.service.ts,
trade-table.component.ts,
fees-handling.service.ts,
currencies-data.service.ts,
currencies-data-table.component.ts
--------------------------------------------------------------------------------------------
27/02/2024 - 28/02/2024
1|| Refactored service to cache data indexDB.service.ts
All promises patterns have been replaced by RxJS observables/pipes
All variables of any type have been refactored to the variables with specific type
All dependant components have been updated accordingly
2|| Refactored any type to the secure ones
--------------------------------------------------------------------------------------------
29/02/2024 - 04/03/2024
1|| Refactored service market-data.service.ts importing market data from Moscow Stock Exchange and Marketstack.com
All embedded subscriptions and promises patterns have been replaced by RxJS observables/pipes
All variables of any type have been refactored to the variables with specific type
All dependant components have been updated accordingly
2|| Refactored market-data-table.component.ts according to new service's model of importing data and optimized UI
3|| Refactored accounting service - accounting.service.ts
All variables of any type have been refactored to the variables with specific type
All dependant components and services have been updated accordingly
4|| Fixed acc-entries-table.component.ts. Refactored getting of transaction types. Insted of using cache service directly, request goes into exhaustMap pipe and component is beeing notified when data has been cached
5|| Fixed DB and middleware layer to get list of entries based on externalId. ExteralId is used to link incoming swifts message with generated entries. Parameter of externalId has been added to pg sql function f_a_b_get_all_entries_transactions.sql and to sql request of middleware layer
6|| Refactored any type to the secure ones in the following components:
market-data.service.ts,
instrument-data.service.ts,
instrument-table.component.ts,
investment-data.service.service.ts,
log-processing.service.ts,
7|| Refactored function of export to excel
--------------------------------------------------------------------------------------------
05/03/2024 - 06/03/2024
1|| Refactored acc-balance-sheet-table.component.ts
Functions to close, open and check the balance have been isolated in new service accounting-balances.service.ts
All embedded subscriptions and promises patterns have been replaced by RxJS observables/pipes
All variables of any type have been refactored to the variables with specific type
All dependant components have been updated accordingly
2|| Refactored market-data-table.component.ts according to new ccounting-balances.service.ts and optimized UI
3|| Refactored any type to the secure ones in the following components:
src/app/services/tree-menu.service.ts,
src/app/components/tables/strategy_structure-hist-table.component/strategy_structure-hist-table.component.ts
src/app/components/tables/strategy_structure-table.component/strategy_structure-table.component.ts
src\app\components\tables\strategies-table.component\strategies-table.component.ts
src\app\components\tables\inv-portfolio-revenue-factor-analysis\inv-portfolio-revenue-factor-analysis.ts,
src\app\components\tables\inv-portfolio-position-table.component\inv-portfolio-position-table.component.ts,
src\app\components\tables\inv-portfolio-npv_roi_performance\inv-portfolio-npv_roi_performance.ts
src\app\components\tables\inv-portfolio-npv_dynamic\inv-portfolio-npv_dynamic.ts
src\app\components\tables\inv-generate-orders-table.component\inv-generate-orders-table.component.ts
src\app\components\tables\acc-transaction-types-table.component\acc-transaction-types-table.component.ts
src\app\components\tables\acc-schemes-LL-table.component\acc-schemes-LL-table.component.ts
src\app\components\tables\acc-schemes-AL-table.component\acc-schemes-AL-table.component.ts
src\app\components\tables\acc-fees-schedules-table.component\acc-fees-schedules-table.component.ts
src\app\components\tables\acc-fees-portfolios-with-schedules-table.component\acc-fees-portfolios-with-schedules-table.component.ts
src/app/components/tables/acc-fees-performance-processing-table.component/acc-fees-performance-processing-table.component.ts
src\app\components\tables\acc-fees-performance-calculation-table.component\acc-fees-performance-calculation-table.component.ts
src\app\components\tables\acc-fees-management-processing-table.component\acc-fees-management-processing-table.component.ts
src\app\components\tables\acc-fees-management-calculation-table.component\acc-fees-management-calculation-table.component.ts
src\app\components\tables\acc-fees-main-table.component\acc-fees-main-table.component.ts
src\app\components\tables\acc-entries-table.component\acc-entries-table.component.ts
src/app/components/tables/acc-balance-sheet-table.component/acc-balance-sheet-table.component.ts
--------------------------------------------------------------------------------------------
07/03/2024 - 09/03/2024
1|| Refactored any type to the secure ones and removed promises in the following components:
src\app\components\tables\acc-accounts-ledger-table.component\acc-accounts-ledger-table.component.ts
src\app\components\tables\acc-accounts-table.component\acc-accounts-table.component.ts
src\app\components\forms\trade-form.component\trade-form.component.ts
src\app\components\forms\strategy-structure-form.component\strategy-structure-form.ts
src\app\components\forms\strategy-form.component\strategy-form.component.ts
src\app\components\forms\portfolio-form.component\portfolio-form.component.ts
src\app\components\forms\instrument-form.component\instrument-form.component.ts
src\app\components\forms\instrument-details-form.component\instrument-details-form.component.ts
src\app\components\forms\instrument-corp-action-form.component\instrument-corp-action-form.component.ts
src\app\components\forms\acc-schemes-ll-form.component\acc-schemes-ll-form.component.ts
src\app\components\forms\acc-schemes-al-form.component\acc-schemes-al-form.component.ts
src\app\components\forms\acc-fees-portfolio-schedule-form.component\acc-fees-portfolio-schedule-form.component.ts
src\app\components\forms\acc-fees-main-
form.component\acc-fees-main-form.component.ts
src\app\components\forms\acc-entry-form.component\acc-entry-form.component.ts
src\app\components\forms\acc-account-form.component\acc-account-form.component.ts
src\app\components\charts\performance-twroi-chart.componentt\performance-twroi-chart.componentt.ts
src/app/components/charts/chart-candle-marketdata/echart-marketdata-candle.ts
src\app\components\charts\performance-revenue-factor-chart.component\performance-revenue-factor-chart.component.ts
2|| Refactored function creating new depo accounts if they are required to generate trading accounting. Refactored to RxJS pipes
--------------------------------------------------------------------------------------------
11/03/24 - 13/03/24
1|| Bugs fixings related to local settings of a user computer. Testing has been started using different client computers and different browsers. Local dates format, numbers and etc
2|| Created pipe and functions to store Moex Boards list. All requests go to the local storage or to the exhaustMap pipe if there is no data in storage yet. When exhaustMap pipe receives data to save it to the storage and send it to the subscribers. The same pipe has been created for market segments
3|| Optimized loading big components by removing duplicates queries to DB
4|| Local Tunnel has been added to the node servers
--------------------------------------------------------------------------------------------
14/03/2024 - 17/03/2024
1|| Portfolio form => Changing portfolio type in edit mode has been disabled
2|| Selection service => Changed logic of selection all. Now only filtered data is selected. It is useful when a user selects a list of accounts based on the text filter and wants to use it for the next search. Example is to get accounts balance for the specific group
3|| Account Selection Table Fix => All accounts are available for selection. Table initiation is moved to ngInit to get actual value of action variable
4|| Balance Sheet Table refactored =>
All search parameters have been transferred into DB procedures in order to limit the resulting dataset. Used pattern allows to pass null value of parameter if it has to be ignored
Implemented new search parameter - account type
All DB procedures have been updated accordingly
Used data range as a search parameter and and new pattern for arrays parameters
5|| Balance Sheet check and deep check updated according to new DB functions
Fix: Balance sheet: dates with entries are updated after execution of closing and opening balance functions
--------------------------------------------------------------------------------------------
18/03/2024 -20/03/2024
|| entries table => complex search by account type
|| npv_dynamic db function refactored due to the change in balance db functions. all related db functions such as fees, performance, revenue factor have been updated accordingly
|| Positions table => Added filter select list which is updated on dataset refreshing
|| Trade Form => Fixed NG100 => Form is being patched with data in ngOnInit hook and only then all necessary validators are added
|| Market Service (Marketstack) => Added step to copy data received from Marketstack server to the main table of market quotes
|| Trade Form - Create on Example => Fixed creating new trade on existing one. Trade date and value date set to today and allocated qty to zero to prevent disabling the form
|| Positions Table => Added rows with NPV values. User is able to filter dataSet by selecting NPV from secid filter list and get fast snapshot
|| Menu component css
|| Portfolio Positions Fees => Fixed: When portfolios list is empty then DB function f_i_get_deducted_fees_per_portfolios_on_date.sql returns fees for all portfolios
--------------------------------------------------------------------------------------------
21/03/2024 - 30/03/2024
1|| Restrictions implementations =>
Added new table to DB scheme
Created functions to retrieve data
New version of fucntion to crete orders taking into account leverage restrictions => Process has been splitted in two step:
fisrt new function f_i_o_prepare_orders_data_by_mp_v2.sql prepares data to be inserted according to leverage handle parameter
second function f_i_o_create_orders_by_mp_v2.sql is responsible for inserting orders data and canceling process if there are oppositie orders
created new functions to retrieve data regarding unaccounted orders f_i_o_get_orders_unaccounted_qty.sql (unaacounted orders are the created orders with any status excepet accounted and they haven't been reflected with client balance as executed trades)
3|| generating orders inv-generate-orders-table.component.ts => notificating about out of date market prices => Addedys when parameter to set quantity of days when quote is deemed as irrelevant. If there are quotes below set limit in order set then dataset filered to show irrelevant orders and alert is raised
2|| Store history of a portfolio changing parameters such as: client, strategy etc. Created UI and DB updated accordingly:( function to retrieve data and trigger to store history)
3|| Manual market quote insert => Created new form and services are updated. Only manually inserted quotes are available for editing or deleting
4|| instrument table=> implemented complex search by instrument type or ISIN; updated UI
5|| generate orders & leverage => UI => new select list to choose strategy how to handle violating of leverage restriction
01/04/2024 - 12/04/2024
1|| Restrictions implementations stage 2 =>
In addition to a leverage restriction new types of limits have been introduced. Such as:
restriction setting a max weight of particular instrument in the client portfolio
restriction setting a max weight of type instruments in the client portfolio. for example option must not exceed 15% of the portfolio
restriction setting a max weight of instruments with particular listing value in the client portfolio. for example junk shares (listing=3) must not exceed 10%
Refactored DB function f_i_r_get_restrictions.sql in order to retrieve restrictions according to new restriction model scheme
Rewritten DB function f_i_o_get_orders_unaccounted.sql to provide unaccounted orders according to the restriction type
2|| Created new function f_i_o_prepare_orders_data_by_mp_v3.sql to calculate order according to new restriction model:
the function has been fully refactored
the function calculates the max possible order amount based on instrument, instrument type and listing restriction. then takes min among them and initial order amount. and as a last step leverage restriction is applied to orders calculated in the previous step
3|| Update UI to generate orders. function and several fields have been replaced by new ones
13/04/2024 -15/04/2024
1|| Restrictions UI =>
Created inv-restriction-schemes-table.component to retrieve list of restrictions by portfolio or whole set.
Created inv-restriction-main-form to create/modify/delete restrictions. Validators are dynamically changing depending on restriction type. for example: field parameter is required for instrument restriction and its value is verified against securities list
Created service to handle restriction related tasks restrictions-handling.service.ts Added functions to retrieve, update restrictions data. Middleware layer has been updated accordingly
2|| Added listing parameter to instrument table => new parameter is available in the instrument table and could be updated via instrument form
3|| DB d_i_restrictions unique indexes = > implemented three unique indexes to prevent creating duplicate restrictions per type. new errors descriptions have been added to the dictionary
16/04/2024 - 21/04/2024
1|| Middleware authentication fixing/refactoring =>
JS passport applied to protect api from unauthorized access.
Realized sessions access.
Every session has to be authorized via application login form. Changed route verification policy and cookie data.
Logout procedure fixed/refactored. Session duly destroyed and local storage cleared in order to ensure ActiveGuard of UI correct behavior.
UI refactored so when session became unauthorized (due to server relaunch or etc) user is notified and prompted to log in again
2|| DB created a new role for middle officers and provided privileges according to its business functions. Besides access restrictions to UI components realized DB role access segregation as the final layer of data protection
3|| DB RLS (row level security policy). For new role of middle officer implemented RLS for client table (dclient) and accounting entries table (AL and LL)
RLS on client table allows to show client data only for counterparts and hide sensitive data of investment clients
RLS on accounting entries table implemented in terms of creating and delete transaction. As a part of allocation process middle officer is responsible of processing trade and creating corresponding accounting. All such accounting created automatically, by functions. RLS allowed to restrict middle officer rights to creating and deleting only autoprocessed entries and the role is forbidden to create any manual entries.
Changed accounting creating form by excluding autoprocessed type of transaction from UI. Accordingly accounting entries table has been by removing option to copy autoprocessed entry and make it as manual one.
4|| Middleware routing according to DB access role => refactored middleware api call execution by redirecting them to the query pool connected to DB via specific access role
5|| HTTP error handling => Implemented http call interceptor in order to properly notify user about error and particularly regarding lack of permissions or unauthorized api call
7|| Allocation function rollback => Realized correct error handling procedure in order to rollback all created transactions (entries and fifo) if anything went wrong
8|| Fixed: Trade vs market quote deviation notification => Bug before verifying its required to convert prices to one currency
9|| Fixed: Allocation accounting - FIFO/Accounting => Roll back FIFO/Accounting when any of accounting fails
10|| Fixed: Revenue Factor shows graph from the last selected object if new object is reused and there's no need to reload it
22/04/2024-01/05/2024
1|| Investment restrictions verification =>
Created DB function to calculate violated investment restrictions. All restriction are being verified against current relative position, model portfolio ratio and current position with created orders deemed as executed
Created UI table to verify investment restrictions. Full UI table is available in portfolios block and the same component with necessary filtering has been added to portfolio, client and Strategy tab
2|| Allocation with restrictions verification => Refactored order execution/allocation process.
Each new allocated trade beforehand is verified against all restrictions, and a list of violations is demonstrated to a user with options to accept/reject potential allocation.
Main allocation function is refactored to RxJS and moved to the allocation service.
Created new component inv-restriction-verify-alloc-table.component/inv-restriction-verify-alloc-table.component.tsto show violated investment restriction with functions to approve allocation or reject it.
Added new DB functions f_i_r_verify_allocation_vs_restrictions.sql to calculate violations and update middleware accordingly
3|| New RLS (bAccountTransaction/bLedgerTransactions) =>
New table bcTransactionType_Ext_Privileges has been introduced to DB.
Table contains transaction types allowed to be inserted or deleted for the particular access role. User based on its accessRole can to modify only transactions types that exist in the table
Thus RLS on insert and delete entries has been granted to public and conditions on existing links in bcTransactionType_Ext_Privileges have been added
4|| Introduced new DB roles aam_back_officer, aam_portfolio_manager, aam_trader, aam_accountant.
Middleware: For each DB access role a separate connection configuration has been and a separate query pool is opened based on role configuration. accessRole is an obligatory parameter for a request. Based on access role server select a right pool
DB: granted necessary privileges and added several RLS policies to segregate access.
Implemented RLS policy on accounts tables to separate auto depo account creation as a part of allocation process from manual account modifying (accountant privilege)
5|| Fixed order delete process. Added RLS policy on dorders to prevent deletion of client orders linked to bulk order
6|| Correct error handler for currencies and market quotes external importing
02/05/2024 - 15/05/24
The project is completed according to the planned functionality list on 8th of May.
The second phase is to prepare technical and presentation documentation, thorough testing, fixing and small refactoring.
1|| Created UI and backend to grant privileges on transaction type (accounting generating) to a specific access role.Table: acc-access-transaction-types-table.component.ts Form: acc-access-transaction-types-form.component.ts
2|| DB Roles => Introduced a new role - salesRM (responsible for updating dclients => tested, creating and updaing portfolios)
3|| The project is made accessible through Ngrok service https://parrot-organic-overly.ngrok-free.app
4|| Fixing
* Fixed: No action parameter in the portfolio form => Pass action parameter to portfolio page when negative by tree. Default set as view when no action parameter has been passed
* Fixed: First opening of portfolio pages requested the whole set of fees schedules - portfolios => Correction onChange lifehook verifies idportfolio is not undefined
* Fixed: Unable to create fees schedule from portfolio page => Fixed by passing necessary portfolio parameters to the form
* Fixed: Removed all pool queries which don't use common module with pool redirection
* Fixed: Incorrect FIFO position calculation if there are more than one in trade within a day. => DB function f_fifo_get_cost_detailed_data.sql Added rest qty as ordering parameter in order to select last positions trades correctly
* Fixed: FIFO position search with date parameter secid and portfolio => fixed by removing last boolean parameter in middle ware query execution function
+ Checked market quotes and currencies rates import on middleOfficer access role. Everythhig is okay
30/05/2024
|| Access segregation model
|| NgRok to access via web. Local Tunnel has been dropped due to its instability
* Fixed performance fee calculation => Changed function f_i_get_npv_dynamic. Portfolio NPV is built upon balance data and in order to get the whole list of positions balance data have to be calculated from the last closed operational day at least. Thus balance data retrieved from the least between last closed open day and start_date parameter
* Fixed entries table complex search => refactored common function which transfoms date range objet to postgres range - open range without end date and corrected reset of search form
- In Progress => Global style refactoring
04/06/2024:
|| Global style refactoring:
- Changed pre-built theme by direct modification of its css file. Primary color has been changed to indigo
- A set of color parameters have been introduced inside styles.css. These params are used to style non-material elements of UI
- 95% of local components styles has been replaced by global styling via style.scc
- Created unified flexible style approach.Easy to modify and expand
Done:
|| Instrument tabs to fill inquery
|| Architecture
|| Business process flow chart
|| CV (check spelling)
|| linkedIn
|| Table Access segregation model
|| Git (ts or js, release, export main functions from PG and add them to the repository, add PG database backup file)
ToDo
|| Q&A Angualar, postgres
|| Create AAM presentation with screen from the interface which highlight core functionality
Done:
|| AA Stie - MyPage - Add link to the repository of the AAM project
|| AAA: updated/expanded top menu with navigation to the main pages
* Fx: SWIFT proccessing - show dates with messages. Done via restored style class
* Fix complex search of imported quotes. There is a null chip in the autocomplete list and set search date interval by default on today
* Fix: Creating Fee schedule: Validation of form is failed although all fields are okay
* Fix: Forbid to delete portfolio's fee schedule if there's created calculations - Done via trigger
Phase 2:
|| Multi Currencies accounts
|| Fx client conversion, fx market trade
|| FX management: OCP (open currency position), exposure
A full-scale SPA Asset Management Platform.
Features:
- Whole investment managment cycle (client portfolios, stratiegies, investment restrictions, model portfolios, orders, trades, analitics, performance/mangement fees)
- Whole accounting cycle balance sheet (closing, opening, reconcilation), fees processing, FIFO (including short sales), deatiled reporting, flexible accounting schemes managemnt system, cash/securities accounts (overdrafts), manual/automantic/stp transactions, swifts