wbfdm 2.2.1__py2.py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of wbfdm might be problematic. Click here for more details.
- wbfdm/__init__.py +2 -0
- wbfdm/admin/__init__.py +42 -0
- wbfdm/admin/classifications.py +39 -0
- wbfdm/admin/esg.py +23 -0
- wbfdm/admin/exchanges.py +53 -0
- wbfdm/admin/instrument_lists.py +23 -0
- wbfdm/admin/instrument_prices.py +62 -0
- wbfdm/admin/instrument_requests.py +33 -0
- wbfdm/admin/instruments.py +117 -0
- wbfdm/admin/instruments_relationships.py +25 -0
- wbfdm/admin/options.py +101 -0
- wbfdm/analysis/__init__.py +2 -0
- wbfdm/analysis/esg/__init__.py +0 -0
- wbfdm/analysis/esg/enums.py +82 -0
- wbfdm/analysis/esg/esg_analysis.py +217 -0
- wbfdm/analysis/esg/utils.py +13 -0
- wbfdm/analysis/financial_analysis/__init__.py +1 -0
- wbfdm/analysis/financial_analysis/financial_metric_analysis.py +88 -0
- wbfdm/analysis/financial_analysis/financial_ratio_analysis.py +125 -0
- wbfdm/analysis/financial_analysis/financial_statistics_analysis.py +271 -0
- wbfdm/analysis/financial_analysis/statement_with_estimates.py +558 -0
- wbfdm/analysis/financial_analysis/utils.py +316 -0
- wbfdm/analysis/technical_analysis/__init__.py +1 -0
- wbfdm/analysis/technical_analysis/technical_analysis.py +138 -0
- wbfdm/analysis/technical_analysis/traces.py +165 -0
- wbfdm/analysis/utils.py +32 -0
- wbfdm/apps.py +14 -0
- wbfdm/contrib/__init__.py +0 -0
- wbfdm/contrib/dsws/__init__.py +0 -0
- wbfdm/contrib/dsws/client.py +285 -0
- wbfdm/contrib/internal/__init__.py +0 -0
- wbfdm/contrib/internal/dataloaders/__init__.py +0 -0
- wbfdm/contrib/internal/dataloaders/market_data.py +87 -0
- wbfdm/contrib/metric/__init__.py +0 -0
- wbfdm/contrib/metric/admin/__init__.py +2 -0
- wbfdm/contrib/metric/admin/instruments.py +12 -0
- wbfdm/contrib/metric/admin/metrics.py +43 -0
- wbfdm/contrib/metric/apps.py +10 -0
- wbfdm/contrib/metric/backends/__init__.py +2 -0
- wbfdm/contrib/metric/backends/base.py +159 -0
- wbfdm/contrib/metric/backends/performances.py +265 -0
- wbfdm/contrib/metric/backends/statistics.py +182 -0
- wbfdm/contrib/metric/decorators.py +14 -0
- wbfdm/contrib/metric/dispatch.py +23 -0
- wbfdm/contrib/metric/dto.py +88 -0
- wbfdm/contrib/metric/exceptions.py +6 -0
- wbfdm/contrib/metric/factories.py +33 -0
- wbfdm/contrib/metric/filters.py +28 -0
- wbfdm/contrib/metric/migrations/0001_initial.py +88 -0
- wbfdm/contrib/metric/migrations/0002_remove_instrumentmetric_unique_instrument_metric_and_more.py +26 -0
- wbfdm/contrib/metric/migrations/__init__.py +0 -0
- wbfdm/contrib/metric/models.py +180 -0
- wbfdm/contrib/metric/orchestrators.py +94 -0
- wbfdm/contrib/metric/registry.py +80 -0
- wbfdm/contrib/metric/serializers.py +44 -0
- wbfdm/contrib/metric/tasks.py +27 -0
- wbfdm/contrib/metric/tests/__init__.py +0 -0
- wbfdm/contrib/metric/tests/backends/__init__.py +0 -0
- wbfdm/contrib/metric/tests/backends/test_performances.py +152 -0
- wbfdm/contrib/metric/tests/backends/test_statistics.py +48 -0
- wbfdm/contrib/metric/tests/conftest.py +92 -0
- wbfdm/contrib/metric/tests/test_dto.py +73 -0
- wbfdm/contrib/metric/tests/test_models.py +72 -0
- wbfdm/contrib/metric/tests/test_tasks.py +24 -0
- wbfdm/contrib/metric/tests/test_viewsets.py +79 -0
- wbfdm/contrib/metric/urls.py +19 -0
- wbfdm/contrib/metric/viewsets/__init__.py +1 -0
- wbfdm/contrib/metric/viewsets/configs/__init__.py +1 -0
- wbfdm/contrib/metric/viewsets/configs/display.py +92 -0
- wbfdm/contrib/metric/viewsets/configs/menus.py +11 -0
- wbfdm/contrib/metric/viewsets/configs/utils.py +137 -0
- wbfdm/contrib/metric/viewsets/mixins.py +245 -0
- wbfdm/contrib/metric/viewsets/viewsets.py +40 -0
- wbfdm/contrib/msci/__init__.py +0 -0
- wbfdm/contrib/msci/client.py +92 -0
- wbfdm/contrib/msci/dataloaders/__init__.py +0 -0
- wbfdm/contrib/msci/dataloaders/esg.py +87 -0
- wbfdm/contrib/msci/dataloaders/esg_controversies.py +81 -0
- wbfdm/contrib/msci/sync.py +58 -0
- wbfdm/contrib/msci/tests/__init__.py +0 -0
- wbfdm/contrib/msci/tests/conftest.py +1 -0
- wbfdm/contrib/msci/tests/test_client.py +70 -0
- wbfdm/contrib/qa/__init__.py +0 -0
- wbfdm/contrib/qa/apps.py +22 -0
- wbfdm/contrib/qa/database_routers.py +25 -0
- wbfdm/contrib/qa/dataloaders/__init__.py +0 -0
- wbfdm/contrib/qa/dataloaders/adjustments.py +56 -0
- wbfdm/contrib/qa/dataloaders/corporate_actions.py +59 -0
- wbfdm/contrib/qa/dataloaders/financials.py +83 -0
- wbfdm/contrib/qa/dataloaders/market_data.py +117 -0
- wbfdm/contrib/qa/dataloaders/officers.py +59 -0
- wbfdm/contrib/qa/dataloaders/reporting_dates.py +67 -0
- wbfdm/contrib/qa/dataloaders/statements.py +267 -0
- wbfdm/contrib/qa/tasks.py +0 -0
- wbfdm/dataloaders/__init__.py +0 -0
- wbfdm/dataloaders/cache.py +129 -0
- wbfdm/dataloaders/protocols.py +112 -0
- wbfdm/dataloaders/proxies.py +201 -0
- wbfdm/dataloaders/types.py +209 -0
- wbfdm/dynamic_preferences_registry.py +45 -0
- wbfdm/enums.py +657 -0
- wbfdm/factories/__init__.py +13 -0
- wbfdm/factories/classifications.py +56 -0
- wbfdm/factories/controversies.py +27 -0
- wbfdm/factories/exchanges.py +21 -0
- wbfdm/factories/instrument_list.py +22 -0
- wbfdm/factories/instrument_prices.py +79 -0
- wbfdm/factories/instruments.py +63 -0
- wbfdm/factories/instruments_relationships.py +31 -0
- wbfdm/factories/options.py +66 -0
- wbfdm/figures/__init__.py +1 -0
- wbfdm/figures/financials/__init__.py +1 -0
- wbfdm/figures/financials/financial_analysis_charts.py +469 -0
- wbfdm/figures/financials/financials_charts.py +711 -0
- wbfdm/filters/__init__.py +31 -0
- wbfdm/filters/classifications.py +100 -0
- wbfdm/filters/exchanges.py +22 -0
- wbfdm/filters/financials.py +95 -0
- wbfdm/filters/financials_analysis.py +119 -0
- wbfdm/filters/instrument_prices.py +112 -0
- wbfdm/filters/instruments.py +198 -0
- wbfdm/filters/utils.py +44 -0
- wbfdm/import_export/__init__.py +0 -0
- wbfdm/import_export/backends/__init__.py +0 -0
- wbfdm/import_export/backends/cbinsights/__init__.py +2 -0
- wbfdm/import_export/backends/cbinsights/deals.py +44 -0
- wbfdm/import_export/backends/cbinsights/equities.py +41 -0
- wbfdm/import_export/backends/cbinsights/mixin.py +15 -0
- wbfdm/import_export/backends/cbinsights/utils/__init__.py +0 -0
- wbfdm/import_export/backends/cbinsights/utils/classifications.py +4150 -0
- wbfdm/import_export/backends/cbinsights/utils/client.py +217 -0
- wbfdm/import_export/backends/refinitiv/__init__.py +5 -0
- wbfdm/import_export/backends/refinitiv/daily_fundamental.py +36 -0
- wbfdm/import_export/backends/refinitiv/fiscal_period.py +63 -0
- wbfdm/import_export/backends/refinitiv/forecast.py +178 -0
- wbfdm/import_export/backends/refinitiv/fundamental.py +103 -0
- wbfdm/import_export/backends/refinitiv/geographic_segment.py +32 -0
- wbfdm/import_export/backends/refinitiv/instrument.py +55 -0
- wbfdm/import_export/backends/refinitiv/instrument_price.py +77 -0
- wbfdm/import_export/backends/refinitiv/mixin.py +29 -0
- wbfdm/import_export/backends/refinitiv/utils/__init__.py +1 -0
- wbfdm/import_export/backends/refinitiv/utils/controller.py +182 -0
- wbfdm/import_export/handlers/__init__.py +0 -0
- wbfdm/import_export/handlers/instrument.py +253 -0
- wbfdm/import_export/handlers/instrument_list.py +101 -0
- wbfdm/import_export/handlers/instrument_price.py +71 -0
- wbfdm/import_export/handlers/option.py +54 -0
- wbfdm/import_export/handlers/private_equities.py +49 -0
- wbfdm/import_export/parsers/__init__.py +0 -0
- wbfdm/import_export/parsers/cbinsights/__init__.py +0 -0
- wbfdm/import_export/parsers/cbinsights/deals.py +39 -0
- wbfdm/import_export/parsers/cbinsights/equities.py +56 -0
- wbfdm/import_export/parsers/cbinsights/fundamentals.py +45 -0
- wbfdm/import_export/parsers/refinitiv/__init__.py +0 -0
- wbfdm/import_export/parsers/refinitiv/daily_fundamental.py +7 -0
- wbfdm/import_export/parsers/refinitiv/forecast.py +7 -0
- wbfdm/import_export/parsers/refinitiv/fundamental.py +9 -0
- wbfdm/import_export/parsers/refinitiv/geographic_segment.py +7 -0
- wbfdm/import_export/parsers/refinitiv/instrument.py +75 -0
- wbfdm/import_export/parsers/refinitiv/instrument_price.py +26 -0
- wbfdm/import_export/parsers/refinitiv/utils.py +96 -0
- wbfdm/import_export/resources/__init__.py +0 -0
- wbfdm/import_export/resources/classification.py +23 -0
- wbfdm/import_export/resources/instrument_prices.py +33 -0
- wbfdm/import_export/resources/instruments.py +176 -0
- wbfdm/jinja2.py +7 -0
- wbfdm/management/__init__.py +30 -0
- wbfdm/menu.py +11 -0
- wbfdm/migrations/0001_initial.py +71 -0
- wbfdm/migrations/0002_rename_statements_instrumentlookup_financials_and_more.py +144 -0
- wbfdm/migrations/0003_instrument_estimate_backend_and_more.py +34 -0
- wbfdm/migrations/0004_rename_financials_instrumentlookup_statements_and_more.py +86 -0
- wbfdm/migrations/0005_instrument_corporate_action_backend.py +29 -0
- wbfdm/migrations/0006_instrument_officer_backend.py +29 -0
- wbfdm/migrations/0007_instrument_country_instrument_currency_and_more.py +117 -0
- wbfdm/migrations/0008_controversy.py +75 -0
- wbfdm/migrations/0009_alter_controversy_flag_alter_controversy_initiated_and_more.py +85 -0
- wbfdm/migrations/0010_classification_classificationgroup_deal_exchange_and_more.py +1299 -0
- wbfdm/migrations/0011_delete_instrumentlookup_instrument_corporate_actions_and_more.py +169 -0
- wbfdm/migrations/0012_instrumentprice_created_instrumentprice_modified.py +564 -0
- wbfdm/migrations/0013_instrument_is_investable_universe_and_more.py +199 -0
- wbfdm/migrations/0014_alter_controversy_instrument.py +22 -0
- wbfdm/migrations/0015_instrument_instrument_investible_index.py +16 -0
- wbfdm/migrations/0016_instrumenttype_name_repr.py +18 -0
- wbfdm/migrations/0017_instrument_instrument_security_index.py +16 -0
- wbfdm/migrations/0018_instrument_instrument_level_index.py +20 -0
- wbfdm/migrations/0019_alter_controversy_source.py +17 -0
- wbfdm/migrations/0020_optionaggregate_option_and_more.py +249 -0
- wbfdm/migrations/0021_delete_instrumentdailystatistics.py +15 -0
- wbfdm/migrations/0022_instrument_cusip_option_open_interest_20d_and_more.py +91 -0
- wbfdm/migrations/0023_instrument_unique_ric_instrument_unique_rmc_and_more.py +53 -0
- wbfdm/migrations/0024_option_open_interest_10d_option_volume_10d_and_more.py +36 -0
- wbfdm/migrations/0025_instrument_is_primary_and_more.py +29 -0
- wbfdm/migrations/0026_instrument_is_cash_equivalent.py +30 -0
- wbfdm/migrations/0027_remove_instrument_unique_ric_and_more.py +100 -0
- wbfdm/migrations/__init__.py +0 -0
- wbfdm/models/__init__.py +4 -0
- wbfdm/models/esg/__init__.py +1 -0
- wbfdm/models/esg/controversies.py +81 -0
- wbfdm/models/exchanges/__init__.py +1 -0
- wbfdm/models/exchanges/exchanges.py +223 -0
- wbfdm/models/fields.py +117 -0
- wbfdm/models/fk_fields.py +403 -0
- wbfdm/models/indicators.py +0 -0
- wbfdm/models/instruments/__init__.py +19 -0
- wbfdm/models/instruments/classifications.py +265 -0
- wbfdm/models/instruments/instrument_lists.py +120 -0
- wbfdm/models/instruments/instrument_prices.py +540 -0
- wbfdm/models/instruments/instrument_relationships.py +251 -0
- wbfdm/models/instruments/instrument_requests.py +196 -0
- wbfdm/models/instruments/instruments.py +991 -0
- wbfdm/models/instruments/llm/__init__.py +1 -0
- wbfdm/models/instruments/llm/create_instrument_news_relationships.py +78 -0
- wbfdm/models/instruments/mixin/__init__.py +0 -0
- wbfdm/models/instruments/mixin/financials_computed.py +804 -0
- wbfdm/models/instruments/mixin/financials_serializer_fields.py +1407 -0
- wbfdm/models/instruments/mixin/instruments.py +294 -0
- wbfdm/models/instruments/options.py +225 -0
- wbfdm/models/instruments/private_equities.py +59 -0
- wbfdm/models/instruments/querysets.py +73 -0
- wbfdm/models/instruments/utils.py +41 -0
- wbfdm/preferences.py +21 -0
- wbfdm/serializers/__init__.py +4 -0
- wbfdm/serializers/esg.py +36 -0
- wbfdm/serializers/exchanges.py +39 -0
- wbfdm/serializers/instruments/__init__.py +37 -0
- wbfdm/serializers/instruments/classifications.py +139 -0
- wbfdm/serializers/instruments/instrument_lists.py +61 -0
- wbfdm/serializers/instruments/instrument_prices.py +73 -0
- wbfdm/serializers/instruments/instrument_relationships.py +170 -0
- wbfdm/serializers/instruments/instrument_requests.py +61 -0
- wbfdm/serializers/instruments/instruments.py +274 -0
- wbfdm/serializers/instruments/mixins.py +104 -0
- wbfdm/serializers/officers.py +20 -0
- wbfdm/signals.py +7 -0
- wbfdm/sync/__init__.py +0 -0
- wbfdm/sync/abstract.py +31 -0
- wbfdm/sync/runner.py +22 -0
- wbfdm/tasks.py +69 -0
- wbfdm/tests/__init__.py +0 -0
- wbfdm/tests/analysis/__init__.py +0 -0
- wbfdm/tests/analysis/financial_analysis/__init__.py +0 -0
- wbfdm/tests/analysis/financial_analysis/test_statement_with_estimates.py +392 -0
- wbfdm/tests/analysis/financial_analysis/test_utils.py +322 -0
- wbfdm/tests/analysis/test_esg.py +159 -0
- wbfdm/tests/conftest.py +92 -0
- wbfdm/tests/dataloaders/__init__.py +0 -0
- wbfdm/tests/dataloaders/test_cache.py +73 -0
- wbfdm/tests/models/__init__.py +0 -0
- wbfdm/tests/models/test_classifications.py +99 -0
- wbfdm/tests/models/test_exchanges.py +7 -0
- wbfdm/tests/models/test_instrument_list.py +117 -0
- wbfdm/tests/models/test_instrument_prices.py +306 -0
- wbfdm/tests/models/test_instruments.py +202 -0
- wbfdm/tests/models/test_merge.py +99 -0
- wbfdm/tests/models/test_options.py +69 -0
- wbfdm/tests/test_tasks.py +6 -0
- wbfdm/tests/tests.py +10 -0
- wbfdm/urls.py +222 -0
- wbfdm/utils.py +54 -0
- wbfdm/viewsets/__init__.py +10 -0
- wbfdm/viewsets/configs/__init__.py +5 -0
- wbfdm/viewsets/configs/buttons/__init__.py +8 -0
- wbfdm/viewsets/configs/buttons/classifications.py +23 -0
- wbfdm/viewsets/configs/buttons/exchanges.py +9 -0
- wbfdm/viewsets/configs/buttons/instrument_prices.py +49 -0
- wbfdm/viewsets/configs/buttons/instruments.py +283 -0
- wbfdm/viewsets/configs/display/__init__.py +22 -0
- wbfdm/viewsets/configs/display/classifications.py +138 -0
- wbfdm/viewsets/configs/display/esg.py +75 -0
- wbfdm/viewsets/configs/display/exchanges.py +42 -0
- wbfdm/viewsets/configs/display/instrument_lists.py +137 -0
- wbfdm/viewsets/configs/display/instrument_prices.py +199 -0
- wbfdm/viewsets/configs/display/instrument_requests.py +116 -0
- wbfdm/viewsets/configs/display/instruments.py +618 -0
- wbfdm/viewsets/configs/display/instruments_relationships.py +65 -0
- wbfdm/viewsets/configs/display/monthly_performances.py +72 -0
- wbfdm/viewsets/configs/display/officers.py +16 -0
- wbfdm/viewsets/configs/display/prices.py +21 -0
- wbfdm/viewsets/configs/display/statement_with_estimates.py +101 -0
- wbfdm/viewsets/configs/display/statements.py +48 -0
- wbfdm/viewsets/configs/endpoints/__init__.py +41 -0
- wbfdm/viewsets/configs/endpoints/classifications.py +87 -0
- wbfdm/viewsets/configs/endpoints/esg.py +20 -0
- wbfdm/viewsets/configs/endpoints/exchanges.py +6 -0
- wbfdm/viewsets/configs/endpoints/financials_analysis.py +65 -0
- wbfdm/viewsets/configs/endpoints/instrument_lists.py +38 -0
- wbfdm/viewsets/configs/endpoints/instrument_prices.py +51 -0
- wbfdm/viewsets/configs/endpoints/instrument_requests.py +20 -0
- wbfdm/viewsets/configs/endpoints/instruments.py +13 -0
- wbfdm/viewsets/configs/endpoints/instruments_relationships.py +31 -0
- wbfdm/viewsets/configs/endpoints/statements.py +6 -0
- wbfdm/viewsets/configs/menus/__init__.py +9 -0
- wbfdm/viewsets/configs/menus/classifications.py +19 -0
- wbfdm/viewsets/configs/menus/exchanges.py +10 -0
- wbfdm/viewsets/configs/menus/instrument_lists.py +10 -0
- wbfdm/viewsets/configs/menus/instruments.py +20 -0
- wbfdm/viewsets/configs/menus/instruments_relationships.py +33 -0
- wbfdm/viewsets/configs/titles/__init__.py +42 -0
- wbfdm/viewsets/configs/titles/classifications.py +79 -0
- wbfdm/viewsets/configs/titles/esg.py +11 -0
- wbfdm/viewsets/configs/titles/exchanges.py +12 -0
- wbfdm/viewsets/configs/titles/financial_ratio_analysis.py +6 -0
- wbfdm/viewsets/configs/titles/financials_analysis.py +50 -0
- wbfdm/viewsets/configs/titles/instrument_prices.py +50 -0
- wbfdm/viewsets/configs/titles/instrument_requests.py +16 -0
- wbfdm/viewsets/configs/titles/instruments.py +31 -0
- wbfdm/viewsets/configs/titles/instruments_relationships.py +21 -0
- wbfdm/viewsets/configs/titles/market_data.py +13 -0
- wbfdm/viewsets/configs/titles/prices.py +15 -0
- wbfdm/viewsets/configs/titles/statement_with_estimates.py +10 -0
- wbfdm/viewsets/esg.py +72 -0
- wbfdm/viewsets/exchanges.py +63 -0
- wbfdm/viewsets/financial_analysis/__init__.py +3 -0
- wbfdm/viewsets/financial_analysis/financial_metric_analysis.py +85 -0
- wbfdm/viewsets/financial_analysis/financial_ratio_analysis.py +85 -0
- wbfdm/viewsets/financial_analysis/statement_with_estimates.py +145 -0
- wbfdm/viewsets/instruments/__init__.py +80 -0
- wbfdm/viewsets/instruments/classifications.py +279 -0
- wbfdm/viewsets/instruments/financials_analysis.py +614 -0
- wbfdm/viewsets/instruments/instrument_lists.py +77 -0
- wbfdm/viewsets/instruments/instrument_prices.py +542 -0
- wbfdm/viewsets/instruments/instrument_requests.py +51 -0
- wbfdm/viewsets/instruments/instruments.py +106 -0
- wbfdm/viewsets/instruments/instruments_relationships.py +235 -0
- wbfdm/viewsets/instruments/utils.py +27 -0
- wbfdm/viewsets/market_data.py +172 -0
- wbfdm/viewsets/mixins.py +9 -0
- wbfdm/viewsets/officers.py +27 -0
- wbfdm/viewsets/prices.py +62 -0
- wbfdm/viewsets/statements/__init__.py +1 -0
- wbfdm/viewsets/statements/statements.py +100 -0
- wbfdm/viewsets/technical_analysis/__init__.py +1 -0
- wbfdm/viewsets/technical_analysis/monthly_performances.py +93 -0
- wbfdm-2.2.1.dist-info/METADATA +15 -0
- wbfdm-2.2.1.dist-info/RECORD +337 -0
- wbfdm-2.2.1.dist-info/WHEEL +5 -0
|
@@ -0,0 +1,1299 @@
|
|
|
1
|
+
# Generated by Django 4.2.7 on 2023-11-27 09:43
|
|
2
|
+
|
|
3
|
+
import colorfield.fields
|
|
4
|
+
import django.contrib.postgres.fields
|
|
5
|
+
import django.core.validators
|
|
6
|
+
import django.db.models.deletion
|
|
7
|
+
import django_better_admin_arrayfield.models.fields
|
|
8
|
+
import django_fsm
|
|
9
|
+
import mptt.fields
|
|
10
|
+
import wbcore.models.fields
|
|
11
|
+
from django.apps import apps
|
|
12
|
+
from django.db import migrations, models
|
|
13
|
+
from wbfdm.models.instruments.mixin.financials_computed import (
|
|
14
|
+
InstrumentPriceComputedMixin,
|
|
15
|
+
)
|
|
16
|
+
|
|
17
|
+
state_operations = [
|
|
18
|
+
migrations.CreateModel(
|
|
19
|
+
name="Classification",
|
|
20
|
+
fields=[
|
|
21
|
+
(
|
|
22
|
+
"id",
|
|
23
|
+
models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name="ID"),
|
|
24
|
+
),
|
|
25
|
+
("computed_str", models.CharField(blank=True, max_length=512, null=True, verbose_name="Name")),
|
|
26
|
+
(
|
|
27
|
+
"height",
|
|
28
|
+
models.PositiveIntegerField(default=0, verbose_name="The height (leaf node have height 0)"),
|
|
29
|
+
),
|
|
30
|
+
(
|
|
31
|
+
"level_representation",
|
|
32
|
+
models.CharField(max_length=256, verbose_name="Level Representation"),
|
|
33
|
+
),
|
|
34
|
+
("name", models.CharField(max_length=128, verbose_name="Name")),
|
|
35
|
+
("code_aggregated", models.CharField(max_length=64, verbose_name="Code Aggregated")),
|
|
36
|
+
(
|
|
37
|
+
"investable",
|
|
38
|
+
models.BooleanField(default=True, help_text="Is this classification investable for us?"),
|
|
39
|
+
),
|
|
40
|
+
(
|
|
41
|
+
"description",
|
|
42
|
+
models.TextField(
|
|
43
|
+
blank=True,
|
|
44
|
+
default="",
|
|
45
|
+
help_text="Give a basic definition and description",
|
|
46
|
+
verbose_name="Definition/Description",
|
|
47
|
+
),
|
|
48
|
+
),
|
|
49
|
+
("lft", models.PositiveIntegerField(editable=False)),
|
|
50
|
+
("rght", models.PositiveIntegerField(editable=False)),
|
|
51
|
+
("tree_id", models.PositiveIntegerField(db_index=True, editable=False)),
|
|
52
|
+
("level", models.PositiveIntegerField(editable=False)),
|
|
53
|
+
],
|
|
54
|
+
options={
|
|
55
|
+
"verbose_name": "Classification",
|
|
56
|
+
"verbose_name_plural": "Classifications",
|
|
57
|
+
},
|
|
58
|
+
),
|
|
59
|
+
migrations.CreateModel(
|
|
60
|
+
name="ClassificationGroup",
|
|
61
|
+
fields=[
|
|
62
|
+
(
|
|
63
|
+
"id",
|
|
64
|
+
models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name="ID"),
|
|
65
|
+
),
|
|
66
|
+
("name", models.CharField(max_length=128, verbose_name="Name")),
|
|
67
|
+
(
|
|
68
|
+
"is_primary",
|
|
69
|
+
models.BooleanField(
|
|
70
|
+
default=False,
|
|
71
|
+
help_text="Set to True if this classification must be used as default if not specified otherwise",
|
|
72
|
+
verbose_name="Primary",
|
|
73
|
+
),
|
|
74
|
+
),
|
|
75
|
+
("max_depth", models.IntegerField(default=0, verbose_name="Maximum Depth")),
|
|
76
|
+
(
|
|
77
|
+
"code_level_digits",
|
|
78
|
+
models.IntegerField(default=2, verbose_name="The number of digits per code level"),
|
|
79
|
+
),
|
|
80
|
+
],
|
|
81
|
+
options={
|
|
82
|
+
"verbose_name": "Classification Group",
|
|
83
|
+
"verbose_name_plural": "Classification Groups",
|
|
84
|
+
},
|
|
85
|
+
),
|
|
86
|
+
migrations.CreateModel(
|
|
87
|
+
name="Deal",
|
|
88
|
+
fields=[
|
|
89
|
+
(
|
|
90
|
+
"id",
|
|
91
|
+
models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name="ID"),
|
|
92
|
+
),
|
|
93
|
+
(
|
|
94
|
+
"type",
|
|
95
|
+
models.CharField(
|
|
96
|
+
choices=[
|
|
97
|
+
("DEAL", "Deal"),
|
|
98
|
+
("FUNDING", "Funding"),
|
|
99
|
+
("INVESTMENT", "Investment"),
|
|
100
|
+
("PORTFOLIO_EXIT", "Portfolio Exit"),
|
|
101
|
+
],
|
|
102
|
+
default="DEAL",
|
|
103
|
+
help_text="The deal type",
|
|
104
|
+
max_length=14,
|
|
105
|
+
verbose_name="Type",
|
|
106
|
+
),
|
|
107
|
+
),
|
|
108
|
+
("external_id", models.CharField(blank=True, max_length=64, null=True)),
|
|
109
|
+
("date", models.DateField()),
|
|
110
|
+
("transaction_amount", models.FloatField(help_text="Deal Size (in millions")),
|
|
111
|
+
("funding_round", models.CharField(max_length=128, verbose_name="Funding Round")),
|
|
112
|
+
(
|
|
113
|
+
"funding_round_category",
|
|
114
|
+
models.CharField(max_length=128, verbose_name="Funding Round Category"),
|
|
115
|
+
),
|
|
116
|
+
(
|
|
117
|
+
"valuation",
|
|
118
|
+
models.FloatField(
|
|
119
|
+
blank=True,
|
|
120
|
+
help_text="Valuation of the funded organization after this transaction (in Millions USD).",
|
|
121
|
+
null=True,
|
|
122
|
+
verbose_name="Valuaton",
|
|
123
|
+
),
|
|
124
|
+
),
|
|
125
|
+
(
|
|
126
|
+
"valuation_estimated",
|
|
127
|
+
models.BooleanField(
|
|
128
|
+
default=False,
|
|
129
|
+
help_text="True if the valuation is an estimate",
|
|
130
|
+
verbose_name="Is valuation estimated",
|
|
131
|
+
),
|
|
132
|
+
),
|
|
133
|
+
(
|
|
134
|
+
"valuation_source_type",
|
|
135
|
+
models.CharField(blank=True, help_text="The source type of the valuation", max_length=24, null=True),
|
|
136
|
+
),
|
|
137
|
+
(
|
|
138
|
+
"valuation_media_mention_source_urls",
|
|
139
|
+
django.contrib.postgres.fields.ArrayField(
|
|
140
|
+
base_field=models.URLField(),
|
|
141
|
+
blank=True,
|
|
142
|
+
help_text="List of URLs used to source the valuation for the Media Mentions source type.",
|
|
143
|
+
null=True,
|
|
144
|
+
size=None,
|
|
145
|
+
),
|
|
146
|
+
),
|
|
147
|
+
],
|
|
148
|
+
options={
|
|
149
|
+
"abstract": False,
|
|
150
|
+
},
|
|
151
|
+
bases=(models.Model,),
|
|
152
|
+
),
|
|
153
|
+
migrations.CreateModel(
|
|
154
|
+
name="Exchange",
|
|
155
|
+
fields=[
|
|
156
|
+
(
|
|
157
|
+
"id",
|
|
158
|
+
models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name="ID"),
|
|
159
|
+
),
|
|
160
|
+
(
|
|
161
|
+
"name",
|
|
162
|
+
models.CharField(
|
|
163
|
+
blank=True,
|
|
164
|
+
help_text="Name of the Exchange.",
|
|
165
|
+
max_length=265,
|
|
166
|
+
null=True,
|
|
167
|
+
verbose_name="Exchange Name",
|
|
168
|
+
),
|
|
169
|
+
),
|
|
170
|
+
(
|
|
171
|
+
"opening_time",
|
|
172
|
+
models.TimeField(
|
|
173
|
+
blank=True,
|
|
174
|
+
help_text="The opening time of the exchange",
|
|
175
|
+
null=True,
|
|
176
|
+
verbose_name="Exchange Opening time",
|
|
177
|
+
),
|
|
178
|
+
),
|
|
179
|
+
(
|
|
180
|
+
"closing_time",
|
|
181
|
+
models.TimeField(
|
|
182
|
+
blank=True,
|
|
183
|
+
help_text="The closing time of the exchange",
|
|
184
|
+
null=True,
|
|
185
|
+
verbose_name="Exchange Closing time",
|
|
186
|
+
),
|
|
187
|
+
),
|
|
188
|
+
(
|
|
189
|
+
"mic_code",
|
|
190
|
+
models.CharField(
|
|
191
|
+
blank=True,
|
|
192
|
+
help_text="Market Identifier Code.",
|
|
193
|
+
max_length=4,
|
|
194
|
+
null=True,
|
|
195
|
+
unique=True,
|
|
196
|
+
verbose_name="MIC (ISO)",
|
|
197
|
+
),
|
|
198
|
+
),
|
|
199
|
+
(
|
|
200
|
+
"mic_name",
|
|
201
|
+
models.CharField(
|
|
202
|
+
blank=True,
|
|
203
|
+
help_text="Market Identifier Name.",
|
|
204
|
+
max_length=126,
|
|
205
|
+
null=True,
|
|
206
|
+
verbose_name="MIC (ISO) Name",
|
|
207
|
+
),
|
|
208
|
+
),
|
|
209
|
+
(
|
|
210
|
+
"operating_mic_code",
|
|
211
|
+
models.CharField(
|
|
212
|
+
blank=True,
|
|
213
|
+
help_text="Operating Market Identifier Code.",
|
|
214
|
+
max_length=4,
|
|
215
|
+
null=True,
|
|
216
|
+
verbose_name="Operating MIC Code",
|
|
217
|
+
),
|
|
218
|
+
),
|
|
219
|
+
(
|
|
220
|
+
"operating_mic_name",
|
|
221
|
+
models.CharField(
|
|
222
|
+
blank=True,
|
|
223
|
+
help_text="Operating Market Identifier Name.",
|
|
224
|
+
max_length=126,
|
|
225
|
+
null=True,
|
|
226
|
+
verbose_name="Operating MIC Name",
|
|
227
|
+
),
|
|
228
|
+
),
|
|
229
|
+
(
|
|
230
|
+
"bbg_exchange",
|
|
231
|
+
models.CharField(
|
|
232
|
+
blank=True,
|
|
233
|
+
help_text="Bloomberg Exchange Code.",
|
|
234
|
+
max_length=4,
|
|
235
|
+
null=True,
|
|
236
|
+
verbose_name="BBG Exchange Code",
|
|
237
|
+
),
|
|
238
|
+
),
|
|
239
|
+
(
|
|
240
|
+
"bbg_composite_primary",
|
|
241
|
+
models.BooleanField(
|
|
242
|
+
default=False,
|
|
243
|
+
help_text="Indicates the primary exchange for this BBG Composite Code.",
|
|
244
|
+
verbose_name="BBG Primary composite",
|
|
245
|
+
),
|
|
246
|
+
),
|
|
247
|
+
(
|
|
248
|
+
"bbg_composite",
|
|
249
|
+
models.CharField(
|
|
250
|
+
blank=True,
|
|
251
|
+
help_text="Bloomberg Composite Code.",
|
|
252
|
+
max_length=4,
|
|
253
|
+
null=True,
|
|
254
|
+
verbose_name="BBG Composite Code",
|
|
255
|
+
),
|
|
256
|
+
),
|
|
257
|
+
(
|
|
258
|
+
"refinitiv_identifier_code",
|
|
259
|
+
models.CharField(
|
|
260
|
+
blank=True,
|
|
261
|
+
help_text="Reuters Exchange Code.",
|
|
262
|
+
max_length=4,
|
|
263
|
+
null=True,
|
|
264
|
+
verbose_name="RIC Exchange Code",
|
|
265
|
+
),
|
|
266
|
+
),
|
|
267
|
+
(
|
|
268
|
+
"refinitiv_mnemonic",
|
|
269
|
+
models.CharField(
|
|
270
|
+
blank=True,
|
|
271
|
+
help_text="Reuters Exchange Mnemonic Code.",
|
|
272
|
+
max_length=4,
|
|
273
|
+
null=True,
|
|
274
|
+
verbose_name="Refinitiv Mnemonic",
|
|
275
|
+
),
|
|
276
|
+
),
|
|
277
|
+
(
|
|
278
|
+
"website",
|
|
279
|
+
models.URLField(
|
|
280
|
+
blank=True, help_text="The Website of the Exchange", null=True, verbose_name="Website"
|
|
281
|
+
),
|
|
282
|
+
),
|
|
283
|
+
(
|
|
284
|
+
"comments",
|
|
285
|
+
models.TextField(
|
|
286
|
+
blank=True,
|
|
287
|
+
default="",
|
|
288
|
+
help_text="Any comments for this exchange",
|
|
289
|
+
verbose_name="Comments",
|
|
290
|
+
),
|
|
291
|
+
),
|
|
292
|
+
],
|
|
293
|
+
options={
|
|
294
|
+
"verbose_name": "Exchange",
|
|
295
|
+
"verbose_name_plural": "Exchanges",
|
|
296
|
+
},
|
|
297
|
+
),
|
|
298
|
+
migrations.CreateModel(
|
|
299
|
+
name="InstrumentClassificationRelatedInstrument",
|
|
300
|
+
fields=[
|
|
301
|
+
(
|
|
302
|
+
"id",
|
|
303
|
+
models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name="ID"),
|
|
304
|
+
),
|
|
305
|
+
(
|
|
306
|
+
"related_instrument_type",
|
|
307
|
+
models.CharField(
|
|
308
|
+
blank=True,
|
|
309
|
+
choices=[
|
|
310
|
+
("PARTNER", "Partner"),
|
|
311
|
+
("SUPPLIER", "Supplier"),
|
|
312
|
+
("PEER", "Peer"),
|
|
313
|
+
("COMPETITOR", "Competitor"),
|
|
314
|
+
("BIGGEST_THREAT", "Biggest Threat"),
|
|
315
|
+
("CUSTOMER", "Customer"),
|
|
316
|
+
],
|
|
317
|
+
max_length=16,
|
|
318
|
+
null=True,
|
|
319
|
+
),
|
|
320
|
+
),
|
|
321
|
+
],
|
|
322
|
+
),
|
|
323
|
+
migrations.CreateModel(
|
|
324
|
+
name="InstrumentClassificationThroughModel",
|
|
325
|
+
fields=[
|
|
326
|
+
(
|
|
327
|
+
"id",
|
|
328
|
+
models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name="ID"),
|
|
329
|
+
),
|
|
330
|
+
("tag_detail_endpoint", models.CharField(blank=True, max_length=255, null=True)),
|
|
331
|
+
("tag_representation", models.CharField(blank=True, max_length=512, null=True)),
|
|
332
|
+
("is_favorite", models.BooleanField(default=False)),
|
|
333
|
+
("reason", models.TextField(blank=True, default="", verbose_name="Reason for the choice")),
|
|
334
|
+
(
|
|
335
|
+
"pure_player",
|
|
336
|
+
models.BooleanField(default=False, help_text="Pure Players Companies", verbose_name="Pure Player"),
|
|
337
|
+
),
|
|
338
|
+
(
|
|
339
|
+
"top_player",
|
|
340
|
+
models.BooleanField(default=False, help_text="Top Players Companies", verbose_name="Top Player"),
|
|
341
|
+
),
|
|
342
|
+
(
|
|
343
|
+
"percent_of_revenue",
|
|
344
|
+
models.DecimalField(
|
|
345
|
+
blank=True,
|
|
346
|
+
decimal_places=4,
|
|
347
|
+
max_digits=5,
|
|
348
|
+
null=True,
|
|
349
|
+
validators=[
|
|
350
|
+
django.core.validators.MinValueValidator(0),
|
|
351
|
+
django.core.validators.MaxValueValidator(1),
|
|
352
|
+
],
|
|
353
|
+
verbose_name="% of revenue",
|
|
354
|
+
),
|
|
355
|
+
),
|
|
356
|
+
],
|
|
357
|
+
),
|
|
358
|
+
migrations.CreateModel(
|
|
359
|
+
name="InstrumentFavoriteGroup",
|
|
360
|
+
fields=[
|
|
361
|
+
(
|
|
362
|
+
"id",
|
|
363
|
+
models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name="ID"),
|
|
364
|
+
),
|
|
365
|
+
("name", models.CharField(max_length=256)),
|
|
366
|
+
(
|
|
367
|
+
"public",
|
|
368
|
+
models.BooleanField(
|
|
369
|
+
default=False, help_text="If set to True, this group will be available to everyone."
|
|
370
|
+
),
|
|
371
|
+
),
|
|
372
|
+
(
|
|
373
|
+
"primary",
|
|
374
|
+
models.BooleanField(
|
|
375
|
+
default=False,
|
|
376
|
+
help_text="If set to True, this group will be set as default filter for instrument based viewset (Only one primary group allowed).",
|
|
377
|
+
),
|
|
378
|
+
),
|
|
379
|
+
],
|
|
380
|
+
options={
|
|
381
|
+
"abstract": False,
|
|
382
|
+
},
|
|
383
|
+
),
|
|
384
|
+
migrations.CreateModel(
|
|
385
|
+
name="InstrumentList",
|
|
386
|
+
fields=[
|
|
387
|
+
(
|
|
388
|
+
"id",
|
|
389
|
+
models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name="ID"),
|
|
390
|
+
),
|
|
391
|
+
("name", models.CharField(max_length=255)),
|
|
392
|
+
("identifier", models.CharField(blank=True, max_length=255, unique=True)),
|
|
393
|
+
(
|
|
394
|
+
"instrument_list_type",
|
|
395
|
+
models.CharField(
|
|
396
|
+
blank=True,
|
|
397
|
+
choices=[("WATCH", "Watch List"), ("EXCLUSION", "Exclusion List")],
|
|
398
|
+
max_length=32,
|
|
399
|
+
null=True,
|
|
400
|
+
),
|
|
401
|
+
),
|
|
402
|
+
],
|
|
403
|
+
options={
|
|
404
|
+
"verbose_name": "Instrument List",
|
|
405
|
+
"verbose_name_plural": "Instrument Lists",
|
|
406
|
+
"permissions": (("administrate_instrumentlist", "Can administrate Instrument List"),),
|
|
407
|
+
},
|
|
408
|
+
),
|
|
409
|
+
migrations.CreateModel(
|
|
410
|
+
name="InstrumentListThroughModel",
|
|
411
|
+
fields=[
|
|
412
|
+
(
|
|
413
|
+
"id",
|
|
414
|
+
models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name="ID"),
|
|
415
|
+
),
|
|
416
|
+
("computed_str", models.CharField(blank=True, max_length=512, null=True, verbose_name="Name")),
|
|
417
|
+
("instrument_str", models.CharField(max_length=256)),
|
|
418
|
+
("from_date", models.DateField(blank=True, null=True)),
|
|
419
|
+
("to_date", models.DateField(blank=True, null=True)),
|
|
420
|
+
("comment", models.TextField(blank=True, default="")),
|
|
421
|
+
("validated", models.BooleanField(default=False)),
|
|
422
|
+
],
|
|
423
|
+
options={
|
|
424
|
+
"verbose_name": "Instrument in Instrument List",
|
|
425
|
+
"notification_types": [
|
|
426
|
+
(
|
|
427
|
+
"wbfdm.instrument_list_add",
|
|
428
|
+
"Instrument added to Instrument List",
|
|
429
|
+
"A notification when an instrument gets added to a list.",
|
|
430
|
+
True,
|
|
431
|
+
True,
|
|
432
|
+
True,
|
|
433
|
+
)
|
|
434
|
+
],
|
|
435
|
+
},
|
|
436
|
+
bases=(models.Model,),
|
|
437
|
+
),
|
|
438
|
+
migrations.CreateModel(
|
|
439
|
+
name="InstrumentRequest",
|
|
440
|
+
fields=[
|
|
441
|
+
(
|
|
442
|
+
"id",
|
|
443
|
+
models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name="ID"),
|
|
444
|
+
),
|
|
445
|
+
(
|
|
446
|
+
"instrument_type",
|
|
447
|
+
models.CharField(
|
|
448
|
+
choices=[
|
|
449
|
+
("ADR", "American Depository Receipt (ADR)"),
|
|
450
|
+
("CF", "Close Ended Fund"),
|
|
451
|
+
("EQ", "Equity"),
|
|
452
|
+
("ETF", "Exchange Traded Fund"),
|
|
453
|
+
("ETC", "Exchange Traded Commodity"),
|
|
454
|
+
("ETN", "Exchange Traded Note"),
|
|
455
|
+
("WARRANT", "Warrant"),
|
|
456
|
+
("GDR", "Global Depository Receipt (GDR)"),
|
|
457
|
+
("GS", "Genussschein"),
|
|
458
|
+
("TRUST", "Investment Trust"),
|
|
459
|
+
("NVDR", "Non-voting depository receipt (NVDR)"),
|
|
460
|
+
("PREF", "Preference Share"),
|
|
461
|
+
("COMP", "Company"),
|
|
462
|
+
("QT", "Quote"),
|
|
463
|
+
],
|
|
464
|
+
max_length=255,
|
|
465
|
+
verbose_name="Type",
|
|
466
|
+
),
|
|
467
|
+
),
|
|
468
|
+
(
|
|
469
|
+
"status",
|
|
470
|
+
django_fsm.FSMField(
|
|
471
|
+
choices=[
|
|
472
|
+
("PENDING", "Pending"),
|
|
473
|
+
("APPROVED", "Approved"),
|
|
474
|
+
("DENIED", "Denied"),
|
|
475
|
+
("DRAFT", "Draft"),
|
|
476
|
+
],
|
|
477
|
+
default="DRAFT",
|
|
478
|
+
help_text="The Request Status (default to Pending)",
|
|
479
|
+
max_length=50,
|
|
480
|
+
verbose_name="Status",
|
|
481
|
+
),
|
|
482
|
+
),
|
|
483
|
+
("notes", models.TextField(blank=True, null=True, verbose_name="Notes")),
|
|
484
|
+
(
|
|
485
|
+
"created",
|
|
486
|
+
models.DateTimeField(auto_now_add=True, help_text="The request creation time", verbose_name="Created"),
|
|
487
|
+
),
|
|
488
|
+
("instrument_data", models.JSONField(default=dict, verbose_name="Instrument Data")),
|
|
489
|
+
],
|
|
490
|
+
options={
|
|
491
|
+
"abstract": False,
|
|
492
|
+
},
|
|
493
|
+
),
|
|
494
|
+
migrations.CreateModel(
|
|
495
|
+
name="RelatedInstrumentThroughModel",
|
|
496
|
+
fields=[
|
|
497
|
+
(
|
|
498
|
+
"id",
|
|
499
|
+
models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name="ID"),
|
|
500
|
+
),
|
|
501
|
+
("is_primary", models.BooleanField(default=False)),
|
|
502
|
+
(
|
|
503
|
+
"related_type",
|
|
504
|
+
models.CharField(
|
|
505
|
+
choices=[
|
|
506
|
+
("BENCHMARK", "Benchmark"),
|
|
507
|
+
("PEER", "Peer"),
|
|
508
|
+
("RISK_INSTRUMENT", "Risk Instrument"),
|
|
509
|
+
],
|
|
510
|
+
default="BENCHMARK",
|
|
511
|
+
max_length=32,
|
|
512
|
+
),
|
|
513
|
+
),
|
|
514
|
+
],
|
|
515
|
+
),
|
|
516
|
+
migrations.CreateModel(
|
|
517
|
+
name="Cash",
|
|
518
|
+
fields=[],
|
|
519
|
+
options={
|
|
520
|
+
"proxy": True,
|
|
521
|
+
"indexes": [],
|
|
522
|
+
"constraints": [],
|
|
523
|
+
},
|
|
524
|
+
bases=("wbfdm.instrument",),
|
|
525
|
+
),
|
|
526
|
+
migrations.CreateModel(
|
|
527
|
+
name="InstrumentPrice",
|
|
528
|
+
fields=[
|
|
529
|
+
(
|
|
530
|
+
"id",
|
|
531
|
+
models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name="ID"),
|
|
532
|
+
),
|
|
533
|
+
(
|
|
534
|
+
"lock_all_dynamic_fields",
|
|
535
|
+
models.BooleanField(default=False, help_text="If True, will not allow dynamic fields to be updated"),
|
|
536
|
+
),
|
|
537
|
+
(
|
|
538
|
+
"locked_dynamic_fields",
|
|
539
|
+
django_better_admin_arrayfield.models.fields.ArrayField(
|
|
540
|
+
base_field=models.CharField(max_length=128), blank=True, default=list, size=None
|
|
541
|
+
),
|
|
542
|
+
),
|
|
543
|
+
("updated_at", models.DateTimeField(auto_now=True)),
|
|
544
|
+
("date", models.DateField(verbose_name="Date")),
|
|
545
|
+
("calculated", models.BooleanField(default=False, verbose_name="Is Calculated")),
|
|
546
|
+
(
|
|
547
|
+
"net_value",
|
|
548
|
+
models.DecimalField(decimal_places=6, max_digits=16, verbose_name="Value (Net)"),
|
|
549
|
+
),
|
|
550
|
+
(
|
|
551
|
+
"gross_value",
|
|
552
|
+
wbcore.models.fields.DynamicDecimalField(
|
|
553
|
+
blank=True, decimal_places=6, max_digits=16, null=True, verbose_name="Value (Gross)"
|
|
554
|
+
),
|
|
555
|
+
),
|
|
556
|
+
(
|
|
557
|
+
"outstanding_shares",
|
|
558
|
+
wbcore.models.fields.DynamicDecimalField(
|
|
559
|
+
blank=True,
|
|
560
|
+
decimal_places=4,
|
|
561
|
+
help_text="The amount of outstanding share for this instrument",
|
|
562
|
+
max_digits=16,
|
|
563
|
+
null=True,
|
|
564
|
+
verbose_name="Outstanding Shares",
|
|
565
|
+
),
|
|
566
|
+
),
|
|
567
|
+
(
|
|
568
|
+
"outstanding_shares_consolidated",
|
|
569
|
+
wbcore.models.fields.DynamicDecimalField(
|
|
570
|
+
blank=True,
|
|
571
|
+
decimal_places=4,
|
|
572
|
+
help_text="The amount of outstanding share for this instrument",
|
|
573
|
+
max_digits=16,
|
|
574
|
+
null=True,
|
|
575
|
+
verbose_name="Outstanding Shares (Consolidated)",
|
|
576
|
+
),
|
|
577
|
+
),
|
|
578
|
+
(
|
|
579
|
+
"volume",
|
|
580
|
+
models.FloatField(
|
|
581
|
+
blank=True,
|
|
582
|
+
help_text="The Volume of the Asset on the price date of the Asset.",
|
|
583
|
+
null=True,
|
|
584
|
+
verbose_name="Volume",
|
|
585
|
+
),
|
|
586
|
+
),
|
|
587
|
+
(
|
|
588
|
+
"volume_50d",
|
|
589
|
+
wbcore.models.fields.DynamicFloatField(
|
|
590
|
+
blank=True,
|
|
591
|
+
help_text="The Average Volume of the Asset over the last 50 days from the price date of the Asset.",
|
|
592
|
+
null=True,
|
|
593
|
+
verbose_name="Average Volume (50 Days)",
|
|
594
|
+
),
|
|
595
|
+
),
|
|
596
|
+
(
|
|
597
|
+
"volume_200d",
|
|
598
|
+
wbcore.models.fields.DynamicFloatField(
|
|
599
|
+
blank=True,
|
|
600
|
+
help_text="The Average Volume of the Asset over the last 200 days from the price date of the Asset.",
|
|
601
|
+
null=True,
|
|
602
|
+
verbose_name="Average Volume (200 Days)",
|
|
603
|
+
),
|
|
604
|
+
),
|
|
605
|
+
(
|
|
606
|
+
"market_capitalization",
|
|
607
|
+
models.FloatField(
|
|
608
|
+
blank=True,
|
|
609
|
+
help_text="The Market Capitalization of the Asset the price date of the Asset.",
|
|
610
|
+
null=True,
|
|
611
|
+
verbose_name="Market Capitalization",
|
|
612
|
+
),
|
|
613
|
+
),
|
|
614
|
+
(
|
|
615
|
+
"market_capitalization_consolidated",
|
|
616
|
+
wbcore.models.fields.DynamicFloatField(
|
|
617
|
+
blank=True,
|
|
618
|
+
help_text="the consolidated market value of a company in local currency.",
|
|
619
|
+
null=True,
|
|
620
|
+
verbose_name="Market Capitalization (Consolidated)",
|
|
621
|
+
),
|
|
622
|
+
),
|
|
623
|
+
(
|
|
624
|
+
"lock_statistics",
|
|
625
|
+
models.BooleanField(
|
|
626
|
+
default=False,
|
|
627
|
+
help_text="If True, a save will not override the beta, correlation and sharpe ratio",
|
|
628
|
+
),
|
|
629
|
+
),
|
|
630
|
+
("sharpe_ratio", models.FloatField(blank=True, null=True, verbose_name="Sharpe Ratio")),
|
|
631
|
+
("correlation", models.FloatField(blank=True, null=True, verbose_name="Correlation")),
|
|
632
|
+
("beta", models.FloatField(blank=True, null=True, verbose_name="Beta")),
|
|
633
|
+
(
|
|
634
|
+
"currency_fx_rate_to_usd",
|
|
635
|
+
models.ForeignKey(
|
|
636
|
+
blank=True,
|
|
637
|
+
help_text="Rate to between instrument currency and USD",
|
|
638
|
+
null=True,
|
|
639
|
+
on_delete=django.db.models.deletion.PROTECT,
|
|
640
|
+
related_name="instrument_prices",
|
|
641
|
+
to="currency.currencyfxrates",
|
|
642
|
+
verbose_name="Instrument Currency Rate",
|
|
643
|
+
),
|
|
644
|
+
),
|
|
645
|
+
(
|
|
646
|
+
"import_source",
|
|
647
|
+
models.ForeignKey(
|
|
648
|
+
blank=True,
|
|
649
|
+
null=True,
|
|
650
|
+
on_delete=django.db.models.deletion.SET_NULL,
|
|
651
|
+
to="io.importsource",
|
|
652
|
+
),
|
|
653
|
+
),
|
|
654
|
+
(
|
|
655
|
+
"instrument",
|
|
656
|
+
models.ForeignKey(
|
|
657
|
+
blank=True,
|
|
658
|
+
null=True,
|
|
659
|
+
on_delete=django.db.models.deletion.PROTECT,
|
|
660
|
+
related_name="prices",
|
|
661
|
+
to="wbfdm.instrument",
|
|
662
|
+
verbose_name="Instrument",
|
|
663
|
+
),
|
|
664
|
+
),
|
|
665
|
+
],
|
|
666
|
+
options={
|
|
667
|
+
"verbose_name": "Instrument Price",
|
|
668
|
+
"verbose_name_plural": "Instrument Prices",
|
|
669
|
+
"indexes": [
|
|
670
|
+
models.Index(fields=["calculated", "date", "instrument"], name="fdm_instrumentprice_base_idx"),
|
|
671
|
+
models.Index(fields=["calculated", "instrument"], name="fdm_instrumentprice_idx1"),
|
|
672
|
+
models.Index(fields=["instrument"], name="fdm_instrumentprice_idx2"),
|
|
673
|
+
],
|
|
674
|
+
},
|
|
675
|
+
bases=(
|
|
676
|
+
InstrumentPriceComputedMixin,
|
|
677
|
+
models.Model,
|
|
678
|
+
),
|
|
679
|
+
),
|
|
680
|
+
migrations.AddField(
|
|
681
|
+
model_name="instrument",
|
|
682
|
+
name="additional_urls",
|
|
683
|
+
field=django.contrib.postgres.fields.ArrayField(
|
|
684
|
+
base_field=models.URLField(blank=True, null=True), blank=True, default=list, size=None
|
|
685
|
+
),
|
|
686
|
+
),
|
|
687
|
+
migrations.AddField(
|
|
688
|
+
model_name="instrument",
|
|
689
|
+
name="alternative_names",
|
|
690
|
+
field=django.contrib.postgres.fields.ArrayField(
|
|
691
|
+
base_field=models.CharField(blank=True, max_length=255, null=True), default=list, size=None
|
|
692
|
+
),
|
|
693
|
+
),
|
|
694
|
+
migrations.AddField(
|
|
695
|
+
model_name="instrument",
|
|
696
|
+
name="computed_str",
|
|
697
|
+
field=models.CharField(blank=True, max_length=512, null=True, verbose_name="Name"),
|
|
698
|
+
),
|
|
699
|
+
migrations.AddField(
|
|
700
|
+
model_name="instrument",
|
|
701
|
+
name="founded_year",
|
|
702
|
+
field=models.IntegerField(blank=True, null=True, verbose_name="Founded Year"),
|
|
703
|
+
),
|
|
704
|
+
migrations.AddField(
|
|
705
|
+
model_name="instrument",
|
|
706
|
+
name="headquarter_address",
|
|
707
|
+
field=models.CharField(blank=True, help_text="The company Headquarter address", max_length=512, null=True),
|
|
708
|
+
),
|
|
709
|
+
migrations.AddField(
|
|
710
|
+
model_name="instrument",
|
|
711
|
+
name="headquarter_city",
|
|
712
|
+
field=models.ForeignKey(
|
|
713
|
+
blank=True,
|
|
714
|
+
help_text="The company's headquarter city",
|
|
715
|
+
limit_choices_to={"level": 3},
|
|
716
|
+
null=True,
|
|
717
|
+
on_delete=django.db.models.deletion.SET_NULL,
|
|
718
|
+
related_name="headquarters_of",
|
|
719
|
+
to="geography.geography",
|
|
720
|
+
verbose_name="Headquarter City",
|
|
721
|
+
),
|
|
722
|
+
),
|
|
723
|
+
migrations.AddField(
|
|
724
|
+
model_name="instrument",
|
|
725
|
+
name="identifier",
|
|
726
|
+
field=models.CharField(blank=True, max_length=255, null=True, verbose_name="Identifier"),
|
|
727
|
+
),
|
|
728
|
+
migrations.AddField(
|
|
729
|
+
model_name="instrument",
|
|
730
|
+
name="import_source",
|
|
731
|
+
field=models.ForeignKey(
|
|
732
|
+
blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to="io.importsource"
|
|
733
|
+
),
|
|
734
|
+
),
|
|
735
|
+
migrations.AddField(
|
|
736
|
+
model_name="instrument",
|
|
737
|
+
name="is_cash",
|
|
738
|
+
field=models.BooleanField(default=False),
|
|
739
|
+
),
|
|
740
|
+
migrations.AddField(
|
|
741
|
+
model_name="instrument",
|
|
742
|
+
name="isin",
|
|
743
|
+
field=models.CharField(
|
|
744
|
+
blank=True,
|
|
745
|
+
help_text="The ISIN provided by the bank.",
|
|
746
|
+
max_length=12,
|
|
747
|
+
null=True,
|
|
748
|
+
unique=True,
|
|
749
|
+
verbose_name="ISIN",
|
|
750
|
+
),
|
|
751
|
+
),
|
|
752
|
+
migrations.AddField(
|
|
753
|
+
model_name="instrument",
|
|
754
|
+
name="last_update",
|
|
755
|
+
field=models.DateTimeField(auto_now=True, null=True),
|
|
756
|
+
),
|
|
757
|
+
migrations.AddField(
|
|
758
|
+
model_name="instrument",
|
|
759
|
+
name="name_repr",
|
|
760
|
+
field=models.CharField(blank=True, max_length=255, null=True, verbose_name="Name (Representation)"),
|
|
761
|
+
),
|
|
762
|
+
migrations.AddField(
|
|
763
|
+
model_name="instrument",
|
|
764
|
+
name="old_isins",
|
|
765
|
+
field=django.contrib.postgres.fields.ArrayField(
|
|
766
|
+
base_field=models.CharField(max_length=12),
|
|
767
|
+
blank=True,
|
|
768
|
+
default=list,
|
|
769
|
+
help_text="These old ISINs are stored for this instrument to retrieve it more easily later.",
|
|
770
|
+
size=None,
|
|
771
|
+
verbose_name="Old ISINS",
|
|
772
|
+
),
|
|
773
|
+
),
|
|
774
|
+
migrations.AddField(
|
|
775
|
+
model_name="instrument",
|
|
776
|
+
name="primary_url",
|
|
777
|
+
field=models.URLField(blank=True, help_text="The Company website url", null=True),
|
|
778
|
+
),
|
|
779
|
+
migrations.AddField(
|
|
780
|
+
model_name="instrument",
|
|
781
|
+
name="refinitiv_identifier_code",
|
|
782
|
+
field=models.CharField(
|
|
783
|
+
blank=True,
|
|
784
|
+
help_text="Refinitiv Identifier Code",
|
|
785
|
+
max_length=255,
|
|
786
|
+
null=True,
|
|
787
|
+
unique=True,
|
|
788
|
+
verbose_name="RIC",
|
|
789
|
+
),
|
|
790
|
+
),
|
|
791
|
+
migrations.AddField(
|
|
792
|
+
model_name="instrument",
|
|
793
|
+
name="refinitiv_mnemonic_code",
|
|
794
|
+
field=models.CharField(
|
|
795
|
+
blank=True,
|
|
796
|
+
help_text="Refinitiv Datastream Mnemonic Code",
|
|
797
|
+
max_length=255,
|
|
798
|
+
null=True,
|
|
799
|
+
unique=True,
|
|
800
|
+
verbose_name="Refinitiv Datastream Mnemonic Code",
|
|
801
|
+
),
|
|
802
|
+
),
|
|
803
|
+
migrations.AddField(
|
|
804
|
+
model_name="instrument",
|
|
805
|
+
name="refinitiv_ticker",
|
|
806
|
+
field=models.CharField(
|
|
807
|
+
blank=True,
|
|
808
|
+
help_text="Refinitiv Refinitiv",
|
|
809
|
+
max_length=255,
|
|
810
|
+
null=True,
|
|
811
|
+
unique=True,
|
|
812
|
+
verbose_name="Refinitiv Ticker",
|
|
813
|
+
),
|
|
814
|
+
),
|
|
815
|
+
migrations.AddField(
|
|
816
|
+
model_name="instrument",
|
|
817
|
+
name="sedol",
|
|
818
|
+
field=models.CharField(
|
|
819
|
+
blank=True,
|
|
820
|
+
help_text="Stock Exchange Daily Official List",
|
|
821
|
+
max_length=255,
|
|
822
|
+
null=True,
|
|
823
|
+
unique=True,
|
|
824
|
+
verbose_name="SEDOL",
|
|
825
|
+
),
|
|
826
|
+
),
|
|
827
|
+
migrations.AddField(
|
|
828
|
+
model_name="instrument",
|
|
829
|
+
name="tag_detail_endpoint",
|
|
830
|
+
field=models.CharField(blank=True, max_length=255, null=True),
|
|
831
|
+
),
|
|
832
|
+
migrations.AddField(
|
|
833
|
+
model_name="instrument",
|
|
834
|
+
name="tag_representation",
|
|
835
|
+
field=models.CharField(blank=True, max_length=512, null=True),
|
|
836
|
+
),
|
|
837
|
+
migrations.AddField(
|
|
838
|
+
model_name="instrument",
|
|
839
|
+
name="tags",
|
|
840
|
+
field=models.ManyToManyField(blank=True, related_name="%(app_label)s_%(class)s_items", to="tags.tag"),
|
|
841
|
+
),
|
|
842
|
+
migrations.AddField(
|
|
843
|
+
model_name="instrument",
|
|
844
|
+
name="ticker",
|
|
845
|
+
field=models.CharField(
|
|
846
|
+
blank=True,
|
|
847
|
+
help_text="The Bloomberg ticker without the exchange (e.g. AAPL)",
|
|
848
|
+
max_length=255,
|
|
849
|
+
null=True,
|
|
850
|
+
verbose_name="Ticker Bloomberg",
|
|
851
|
+
),
|
|
852
|
+
),
|
|
853
|
+
migrations.AddField(
|
|
854
|
+
model_name="instrument",
|
|
855
|
+
name="valoren",
|
|
856
|
+
field=models.CharField(
|
|
857
|
+
blank=True,
|
|
858
|
+
help_text="Valoren Number",
|
|
859
|
+
max_length=255,
|
|
860
|
+
null=True,
|
|
861
|
+
unique=True,
|
|
862
|
+
verbose_name="Valoren Number",
|
|
863
|
+
),
|
|
864
|
+
),
|
|
865
|
+
migrations.AddField(
|
|
866
|
+
model_name="relatedinstrumentthroughmodel",
|
|
867
|
+
name="instrument",
|
|
868
|
+
field=models.ForeignKey(
|
|
869
|
+
on_delete=django.db.models.deletion.CASCADE,
|
|
870
|
+
related_name="related_instruments_through",
|
|
871
|
+
to="wbfdm.instrument",
|
|
872
|
+
),
|
|
873
|
+
),
|
|
874
|
+
migrations.AddField(
|
|
875
|
+
model_name="relatedinstrumentthroughmodel",
|
|
876
|
+
name="related_instrument",
|
|
877
|
+
field=models.ForeignKey(
|
|
878
|
+
on_delete=django.db.models.deletion.CASCADE,
|
|
879
|
+
related_name="dependent_instruments_through",
|
|
880
|
+
to="wbfdm.instrument",
|
|
881
|
+
),
|
|
882
|
+
),
|
|
883
|
+
migrations.AddField(
|
|
884
|
+
model_name="instrumentrequest",
|
|
885
|
+
name="created_instrument",
|
|
886
|
+
field=models.OneToOneField(
|
|
887
|
+
blank=True,
|
|
888
|
+
null=True,
|
|
889
|
+
on_delete=django.db.models.deletion.CASCADE,
|
|
890
|
+
related_name="creation_request",
|
|
891
|
+
to="wbfdm.instrument",
|
|
892
|
+
),
|
|
893
|
+
),
|
|
894
|
+
migrations.AddField(
|
|
895
|
+
model_name="instrumentrequest",
|
|
896
|
+
name="handler",
|
|
897
|
+
field=models.ForeignKey(
|
|
898
|
+
blank=True,
|
|
899
|
+
null=True,
|
|
900
|
+
on_delete=django.db.models.deletion.SET_NULL,
|
|
901
|
+
related_name="handled_instrument_requests",
|
|
902
|
+
to="directory.person",
|
|
903
|
+
verbose_name="Handler",
|
|
904
|
+
),
|
|
905
|
+
),
|
|
906
|
+
migrations.AddField(
|
|
907
|
+
model_name="instrumentrequest",
|
|
908
|
+
name="requester",
|
|
909
|
+
field=models.ForeignKey(
|
|
910
|
+
blank=True,
|
|
911
|
+
null=True,
|
|
912
|
+
on_delete=django.db.models.deletion.SET_NULL,
|
|
913
|
+
related_name="instrument_requests",
|
|
914
|
+
to="directory.person",
|
|
915
|
+
verbose_name="Requester",
|
|
916
|
+
),
|
|
917
|
+
),
|
|
918
|
+
migrations.AddField(
|
|
919
|
+
model_name="instrumentlistthroughmodel",
|
|
920
|
+
name="import_source",
|
|
921
|
+
field=models.ForeignKey(
|
|
922
|
+
blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to="io.importsource"
|
|
923
|
+
),
|
|
924
|
+
),
|
|
925
|
+
migrations.AddField(
|
|
926
|
+
model_name="instrumentlistthroughmodel",
|
|
927
|
+
name="instrument",
|
|
928
|
+
field=models.ForeignKey(
|
|
929
|
+
blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to="wbfdm.instrument"
|
|
930
|
+
),
|
|
931
|
+
),
|
|
932
|
+
migrations.AddField(
|
|
933
|
+
model_name="instrumentlistthroughmodel",
|
|
934
|
+
name="instrument_list",
|
|
935
|
+
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to="wbfdm.instrumentlist"),
|
|
936
|
+
),
|
|
937
|
+
migrations.AddField(
|
|
938
|
+
model_name="instrumentfavoritegroup",
|
|
939
|
+
name="instruments",
|
|
940
|
+
field=models.ManyToManyField(
|
|
941
|
+
blank=True,
|
|
942
|
+
related_name="favorite_groups",
|
|
943
|
+
to="wbfdm.instrument",
|
|
944
|
+
verbose_name="Favorite Instruments Group",
|
|
945
|
+
),
|
|
946
|
+
),
|
|
947
|
+
migrations.AddField(
|
|
948
|
+
model_name="instrumentfavoritegroup",
|
|
949
|
+
name="owner",
|
|
950
|
+
field=models.ForeignKey(
|
|
951
|
+
blank=True,
|
|
952
|
+
null=True,
|
|
953
|
+
on_delete=django.db.models.deletion.CASCADE,
|
|
954
|
+
related_name="favorite_instruments_groups",
|
|
955
|
+
to="directory.person",
|
|
956
|
+
),
|
|
957
|
+
),
|
|
958
|
+
migrations.AddField(
|
|
959
|
+
model_name="instrumentclassificationthroughmodel",
|
|
960
|
+
name="classification",
|
|
961
|
+
field=models.ForeignKey(
|
|
962
|
+
on_delete=django.db.models.deletion.CASCADE,
|
|
963
|
+
related_name="instruments_through",
|
|
964
|
+
to="wbfdm.classification",
|
|
965
|
+
),
|
|
966
|
+
),
|
|
967
|
+
migrations.AddField(
|
|
968
|
+
model_name="instrumentclassificationthroughmodel",
|
|
969
|
+
name="instrument",
|
|
970
|
+
field=models.ForeignKey(
|
|
971
|
+
on_delete=django.db.models.deletion.CASCADE,
|
|
972
|
+
related_name="classifications_through",
|
|
973
|
+
to="wbfdm.instrument",
|
|
974
|
+
),
|
|
975
|
+
),
|
|
976
|
+
migrations.AddField(
|
|
977
|
+
model_name="instrumentclassificationthroughmodel",
|
|
978
|
+
name="related_instruments",
|
|
979
|
+
field=models.ManyToManyField(
|
|
980
|
+
blank=True, through="wbfdm.InstrumentClassificationRelatedInstrument", to="wbfdm.instrument"
|
|
981
|
+
),
|
|
982
|
+
),
|
|
983
|
+
migrations.AddField(
|
|
984
|
+
model_name="instrumentclassificationthroughmodel",
|
|
985
|
+
name="tags",
|
|
986
|
+
field=models.ManyToManyField(blank=True, related_name="%(app_label)s_%(class)s_items", to="tags.tag"),
|
|
987
|
+
),
|
|
988
|
+
migrations.AddField(
|
|
989
|
+
model_name="instrumentclassificationrelatedinstrument",
|
|
990
|
+
name="classified_instrument",
|
|
991
|
+
field=models.ForeignKey(
|
|
992
|
+
on_delete=django.db.models.deletion.CASCADE,
|
|
993
|
+
related_name="related_instruements",
|
|
994
|
+
to="wbfdm.instrumentclassificationthroughmodel",
|
|
995
|
+
),
|
|
996
|
+
),
|
|
997
|
+
migrations.AddField(
|
|
998
|
+
model_name="instrumentclassificationrelatedinstrument",
|
|
999
|
+
name="related_instrument",
|
|
1000
|
+
field=models.ForeignKey(
|
|
1001
|
+
on_delete=django.db.models.deletion.CASCADE,
|
|
1002
|
+
related_name="instrument_classification_related",
|
|
1003
|
+
to="wbfdm.instrument",
|
|
1004
|
+
),
|
|
1005
|
+
),
|
|
1006
|
+
migrations.AddField(
|
|
1007
|
+
model_name="exchange",
|
|
1008
|
+
name="city",
|
|
1009
|
+
field=models.ForeignKey(
|
|
1010
|
+
blank=True,
|
|
1011
|
+
help_text="The city where this Exchange is located at.",
|
|
1012
|
+
limit_choices_to={"level": 3},
|
|
1013
|
+
null=True,
|
|
1014
|
+
on_delete=django.db.models.deletion.PROTECT,
|
|
1015
|
+
related_name="portfolio_exchanges_city",
|
|
1016
|
+
to="geography.geography",
|
|
1017
|
+
verbose_name="City",
|
|
1018
|
+
),
|
|
1019
|
+
),
|
|
1020
|
+
migrations.AddField(
|
|
1021
|
+
model_name="exchange",
|
|
1022
|
+
name="country",
|
|
1023
|
+
field=models.ForeignKey(
|
|
1024
|
+
blank=True,
|
|
1025
|
+
limit_choices_to={"level": 1},
|
|
1026
|
+
null=True,
|
|
1027
|
+
on_delete=django.db.models.deletion.SET_NULL,
|
|
1028
|
+
to="geography.geography",
|
|
1029
|
+
),
|
|
1030
|
+
),
|
|
1031
|
+
migrations.AddField(
|
|
1032
|
+
model_name="deal",
|
|
1033
|
+
name="equity",
|
|
1034
|
+
field=models.ForeignKey(
|
|
1035
|
+
on_delete=django.db.models.deletion.CASCADE, related_name="deals", to="wbfdm.instrument"
|
|
1036
|
+
),
|
|
1037
|
+
),
|
|
1038
|
+
migrations.AddField(
|
|
1039
|
+
model_name="deal",
|
|
1040
|
+
name="import_source",
|
|
1041
|
+
field=models.ForeignKey(
|
|
1042
|
+
blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to="io.importsource"
|
|
1043
|
+
),
|
|
1044
|
+
),
|
|
1045
|
+
migrations.AddField(
|
|
1046
|
+
model_name="deal",
|
|
1047
|
+
name="investors",
|
|
1048
|
+
field=models.ManyToManyField(
|
|
1049
|
+
blank=True,
|
|
1050
|
+
help_text="Investors",
|
|
1051
|
+
related_name="invested_deals",
|
|
1052
|
+
to="wbfdm.instrument",
|
|
1053
|
+
verbose_name="Investors",
|
|
1054
|
+
),
|
|
1055
|
+
),
|
|
1056
|
+
migrations.AddField(
|
|
1057
|
+
model_name="classification",
|
|
1058
|
+
name="group",
|
|
1059
|
+
field=models.ForeignKey(
|
|
1060
|
+
on_delete=django.db.models.deletion.CASCADE,
|
|
1061
|
+
related_name="classifications",
|
|
1062
|
+
to="wbfdm.classificationgroup",
|
|
1063
|
+
verbose_name="Classification Group",
|
|
1064
|
+
),
|
|
1065
|
+
),
|
|
1066
|
+
migrations.AddField(
|
|
1067
|
+
model_name="classification",
|
|
1068
|
+
name="parent",
|
|
1069
|
+
field=mptt.fields.TreeForeignKey(
|
|
1070
|
+
blank=True,
|
|
1071
|
+
null=True,
|
|
1072
|
+
on_delete=django.db.models.deletion.CASCADE,
|
|
1073
|
+
related_name="children",
|
|
1074
|
+
to="wbfdm.classification",
|
|
1075
|
+
verbose_name="Parent Classification",
|
|
1076
|
+
),
|
|
1077
|
+
),
|
|
1078
|
+
migrations.AddField(
|
|
1079
|
+
model_name="instrument",
|
|
1080
|
+
name="classifications",
|
|
1081
|
+
field=models.ManyToManyField(
|
|
1082
|
+
blank=True,
|
|
1083
|
+
limit_choices_to=models.Q(("level", models.F("group__max_depth"))),
|
|
1084
|
+
related_name="instruments",
|
|
1085
|
+
through="wbfdm.InstrumentClassificationThroughModel",
|
|
1086
|
+
to="wbfdm.classification",
|
|
1087
|
+
verbose_name="Classifications",
|
|
1088
|
+
),
|
|
1089
|
+
),
|
|
1090
|
+
migrations.AddField(
|
|
1091
|
+
model_name="instrument",
|
|
1092
|
+
name="exchange",
|
|
1093
|
+
field=models.ForeignKey(
|
|
1094
|
+
blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to="wbfdm.exchange"
|
|
1095
|
+
),
|
|
1096
|
+
),
|
|
1097
|
+
migrations.AddField(
|
|
1098
|
+
model_name="instrument",
|
|
1099
|
+
name="related_instruments",
|
|
1100
|
+
field=models.ManyToManyField(
|
|
1101
|
+
blank=True,
|
|
1102
|
+
related_name="benchmarks_of",
|
|
1103
|
+
through="wbfdm.RelatedInstrumentThroughModel",
|
|
1104
|
+
to="wbfdm.instrument",
|
|
1105
|
+
verbose_name="The Related Instruments",
|
|
1106
|
+
),
|
|
1107
|
+
),
|
|
1108
|
+
migrations.AddField(
|
|
1109
|
+
model_name="instrument",
|
|
1110
|
+
name="base_color",
|
|
1111
|
+
field=colorfield.fields.ColorField(
|
|
1112
|
+
blank=True, default="#FF0000", image_field=None, max_length=64, null=True, samples=None
|
|
1113
|
+
),
|
|
1114
|
+
),
|
|
1115
|
+
migrations.AddField(
|
|
1116
|
+
model_name="instrument",
|
|
1117
|
+
name="issue_price",
|
|
1118
|
+
field=models.PositiveIntegerField(
|
|
1119
|
+
default=100,
|
|
1120
|
+
help_text="The initial issue price that is displayed on the factsheet",
|
|
1121
|
+
verbose_name="Issue Price",
|
|
1122
|
+
),
|
|
1123
|
+
),
|
|
1124
|
+
migrations.AddField(
|
|
1125
|
+
model_name="instrument",
|
|
1126
|
+
name="last_valuation_date",
|
|
1127
|
+
field=models.DateField(
|
|
1128
|
+
blank=True, help_text="Last Valuation Date", null=True, verbose_name="Last Valuation Date"
|
|
1129
|
+
),
|
|
1130
|
+
),
|
|
1131
|
+
migrations.AlterUniqueTogether(
|
|
1132
|
+
name="relatedinstrumentthroughmodel",
|
|
1133
|
+
unique_together={("instrument", "related_instrument", "is_primary", "related_type")},
|
|
1134
|
+
),
|
|
1135
|
+
migrations.AddConstraint(
|
|
1136
|
+
model_name="instrumentclassificationthroughmodel",
|
|
1137
|
+
constraint=models.UniqueConstraint(
|
|
1138
|
+
fields=("instrument", "classification"), name="unique_classifiedinstruments"
|
|
1139
|
+
),
|
|
1140
|
+
),
|
|
1141
|
+
migrations.AddConstraint(
|
|
1142
|
+
model_name="instrumentprice",
|
|
1143
|
+
constraint=models.CheckConstraint(
|
|
1144
|
+
check=models.Q(("date__week_day__in", [1, 7]), _negated=True),
|
|
1145
|
+
name="wbfdm_instrumentprice_weekday_constraint",
|
|
1146
|
+
),
|
|
1147
|
+
),
|
|
1148
|
+
migrations.AddField(
|
|
1149
|
+
model_name="exchange",
|
|
1150
|
+
name="source",
|
|
1151
|
+
field=models.CharField(blank=True, max_length=64, null=True),
|
|
1152
|
+
),
|
|
1153
|
+
migrations.AddField(
|
|
1154
|
+
model_name="exchange",
|
|
1155
|
+
name="source_id",
|
|
1156
|
+
field=models.CharField(blank=True, max_length=64, null=True),
|
|
1157
|
+
),
|
|
1158
|
+
migrations.AlterField(
|
|
1159
|
+
model_name="instrumentrequest",
|
|
1160
|
+
name="instrument_type",
|
|
1161
|
+
field=models.CharField(
|
|
1162
|
+
choices=[
|
|
1163
|
+
("ADR", "American Depository Receipt (ADR)"),
|
|
1164
|
+
("CF", "Close Ended Fund"),
|
|
1165
|
+
("EQ", "Equity"),
|
|
1166
|
+
("ETF", "Exchange Traded Fund"),
|
|
1167
|
+
("ETC", "Exchange Traded Commodity"),
|
|
1168
|
+
("ETN", "Exchange Traded Note"),
|
|
1169
|
+
("WARRANT", "Warrant"),
|
|
1170
|
+
("GDR", "Global Depository Receipt (GDR)"),
|
|
1171
|
+
("GS", "Genussschein"),
|
|
1172
|
+
("TRUST", "Investment Trust"),
|
|
1173
|
+
("NVDR", "Non-voting depository receipt (NVDR)"),
|
|
1174
|
+
("PREF", "Preference Share"),
|
|
1175
|
+
("COMP", "Company"),
|
|
1176
|
+
("QT", "Quote"),
|
|
1177
|
+
("Product", "Product"),
|
|
1178
|
+
("Index", "Index"),
|
|
1179
|
+
("ProductGroup", "Product Group"),
|
|
1180
|
+
("Cash", "Cash"),
|
|
1181
|
+
],
|
|
1182
|
+
max_length=255,
|
|
1183
|
+
verbose_name="Type",
|
|
1184
|
+
),
|
|
1185
|
+
),
|
|
1186
|
+
migrations.AddIndex(
|
|
1187
|
+
model_name="exchange",
|
|
1188
|
+
index=models.Index(fields=["source_id", "source"], name="wbfdm_excha_source__802ad7_idx"),
|
|
1189
|
+
),
|
|
1190
|
+
]
|
|
1191
|
+
|
|
1192
|
+
|
|
1193
|
+
def get_operations():
|
|
1194
|
+
if apps.is_installed("wbportfolio"):
|
|
1195
|
+
return [
|
|
1196
|
+
migrations.RunSQL(
|
|
1197
|
+
sql='DROP TABLE "wbfdm_instrument" CASCADE',
|
|
1198
|
+
reverse_sql=migrations.RunSQL.noop,
|
|
1199
|
+
),
|
|
1200
|
+
migrations.SeparateDatabaseAndState(state_operations=state_operations),
|
|
1201
|
+
]
|
|
1202
|
+
return state_operations
|
|
1203
|
+
|
|
1204
|
+
|
|
1205
|
+
def save_pms_instrument_id(apps, schema_editor):
|
|
1206
|
+
InstrumentLookup = apps.get_model("wbfdm", "InstrumentLookup")
|
|
1207
|
+
if apps.is_installed("wbportfolio"):
|
|
1208
|
+
for lp in InstrumentLookup.objects.filter(
|
|
1209
|
+
backend_path="wbfdm.contrib.dsws.backends.market_data.DSWSMarketDataBackend"
|
|
1210
|
+
):
|
|
1211
|
+
try:
|
|
1212
|
+
lp.pms_instrument_id = lp.instrument.pms_instrument.id
|
|
1213
|
+
lp.save()
|
|
1214
|
+
except Exception:
|
|
1215
|
+
pass
|
|
1216
|
+
|
|
1217
|
+
|
|
1218
|
+
class Migration(migrations.Migration):
|
|
1219
|
+
dependencies = [
|
|
1220
|
+
("directory", "0006_employeremployeerelationship_position_name"),
|
|
1221
|
+
("geography", "0001_initial"),
|
|
1222
|
+
("tags", "0001_initial"),
|
|
1223
|
+
("io", "0002_importsource_creator"),
|
|
1224
|
+
("wbfdm", "0009_alter_controversy_flag_alter_controversy_initiated_and_more"),
|
|
1225
|
+
]
|
|
1226
|
+
|
|
1227
|
+
operations = [
|
|
1228
|
+
migrations.RemoveField(
|
|
1229
|
+
model_name="instrumentidentifier",
|
|
1230
|
+
name="instrument",
|
|
1231
|
+
),
|
|
1232
|
+
migrations.AlterModelOptions(
|
|
1233
|
+
name="instrument",
|
|
1234
|
+
options={
|
|
1235
|
+
"permissions": (("administrate_instrument", "Can administrate Instrument"),),
|
|
1236
|
+
"verbose_name": "Instrument",
|
|
1237
|
+
"verbose_name_plural": "Instruments",
|
|
1238
|
+
},
|
|
1239
|
+
),
|
|
1240
|
+
migrations.AddField(
|
|
1241
|
+
model_name="instrumentlookup",
|
|
1242
|
+
name="pms_instrument_id",
|
|
1243
|
+
field=models.IntegerField(blank=True, null=True),
|
|
1244
|
+
),
|
|
1245
|
+
migrations.RunPython(save_pms_instrument_id),
|
|
1246
|
+
migrations.RemoveField(
|
|
1247
|
+
model_name="instrument",
|
|
1248
|
+
name="bbg_lookup",
|
|
1249
|
+
),
|
|
1250
|
+
migrations.RemoveField(
|
|
1251
|
+
model_name="instrument",
|
|
1252
|
+
name="corporate_action_backend",
|
|
1253
|
+
),
|
|
1254
|
+
migrations.RemoveField(
|
|
1255
|
+
model_name="instrument",
|
|
1256
|
+
name="esg_backend",
|
|
1257
|
+
),
|
|
1258
|
+
migrations.RemoveField(
|
|
1259
|
+
model_name="instrument",
|
|
1260
|
+
name="financial_backend",
|
|
1261
|
+
),
|
|
1262
|
+
migrations.RemoveField(
|
|
1263
|
+
model_name="instrument",
|
|
1264
|
+
name="isin_lookup",
|
|
1265
|
+
),
|
|
1266
|
+
migrations.RemoveField(
|
|
1267
|
+
model_name="instrument",
|
|
1268
|
+
name="market_data_backend",
|
|
1269
|
+
),
|
|
1270
|
+
migrations.RemoveField(
|
|
1271
|
+
model_name="instrument",
|
|
1272
|
+
name="officer_backend",
|
|
1273
|
+
),
|
|
1274
|
+
migrations.RemoveField(
|
|
1275
|
+
model_name="instrument",
|
|
1276
|
+
name="ric_lookup",
|
|
1277
|
+
),
|
|
1278
|
+
migrations.RemoveField(
|
|
1279
|
+
model_name="instrument",
|
|
1280
|
+
name="statement_backend",
|
|
1281
|
+
),
|
|
1282
|
+
migrations.RemoveField(
|
|
1283
|
+
model_name="instrument",
|
|
1284
|
+
name="ticker_lookup",
|
|
1285
|
+
),
|
|
1286
|
+
migrations.RemoveField(
|
|
1287
|
+
model_name="instrument",
|
|
1288
|
+
name="valoren_lookup",
|
|
1289
|
+
),
|
|
1290
|
+
migrations.RemoveField(
|
|
1291
|
+
model_name="instrument",
|
|
1292
|
+
name="wkn_lookup",
|
|
1293
|
+
),
|
|
1294
|
+
migrations.DeleteModel(
|
|
1295
|
+
name="InstrumentIdentifier",
|
|
1296
|
+
),
|
|
1297
|
+
# Separate from state
|
|
1298
|
+
*get_operations(),
|
|
1299
|
+
]
|