Skip to content

Commit

Permalink
Chore: Make release 1.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
martinroberson committed Nov 5, 2024
1 parent 4c73f2e commit aef1115
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 18 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Please refer to [Goldman Sachs Developer](https://developer.gs.com/docs/gsquant/

## Requirements

* Python 3.6 or greater
* Python 3.8 or greater
* Access to PIP package manager

## Installation
Expand Down
2 changes: 1 addition & 1 deletion gs_quant/api/gs/assets.py
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,7 @@ def get_asset_positions_for_dates(
start_date_str = start_date.isoformat()

if periods > 1:
end_dates = pd.date_range(start=start_date, end=end_date, periods=periods, closed='right')
end_dates = pd.date_range(start=start_date, end=end_date, periods=periods, inclusive='right')
for date in end_dates:
end_date_str = date.date().isoformat()
url = f'/assets/{asset_id}/positions?startDate={start_date_str}&endDate={end_date_str}&type={position_type}'
Expand Down
12 changes: 9 additions & 3 deletions gs_quant/models/epidemiology.py
Original file line number Diff line number Diff line change
Expand Up @@ -444,10 +444,16 @@ def get_parameters(cls,

# add initial state conditions that vary by age group
initial_conditions = []
for param in ['S0', 'E0', 'I0', 'R0', 'C0', 'M0']:
for param, param_value, param_value_max, param_fixed in [
('S0', S0, S0_max, S0_fixed),
('E0', E0, E0_max, E0_fixed),
('I0', I0, I0_max, I0_fixed),
('R0', R0, R0_max, R0_fixed),
('C0', C0, C0_max, C0_fixed),
('M0', M0, M0_max, M0_fixed),
]:
for k in range(K):
parameters.add(f'{param}_{k}', value=eval(param)[k], min=0, max=eval(f'{param}_max'),
vary=not eval(f'{param}_fixed'))
parameters.add(f'{param}_{k}', value=param_value[k], min=0, max=param_value_max, vary=not param_fixed)
initial_conditions.append(f'{param}_{k}')

return parameters, initial_conditions
Expand Down
4 changes: 3 additions & 1 deletion gs_quant/timeseries/measures_countries.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@

from gs_quant.api.gs.data import QueryType, GsDataApi
from gs_quant.data import Dataset
from gs_quant.data.core import DataContext
from gs_quant.entities.entity import EntityType
from gs_quant.timeseries import plot_measure_entity
from gs_quant.timeseries.measures import _market_data_timed, _extract_series_from_df, \
Expand Down Expand Up @@ -63,9 +64,10 @@ def fci(country_id: str, measure: _FCI_MEASURE = _FCI_MEASURE.FCI, *, source: st
raise NotImplementedError('real-time FCI data is not available')

type_ = QueryType(inflection.titleize(measure.value))
start, end = DataContext.current.start_date, DataContext.current.end_date
if measure == _FCI_MEASURE.REAL_FCI or measure == _FCI_MEASURE.REAL_TWI_CONTRIBUTION:
ds = Dataset('FCI')
df = ds.get_data(geographyId=country_id)
df = ds.get_data(geographyId=country_id, start=start, end=end)
if measure == _FCI_MEASURE.REAL_FCI:
measure = 'realFCI'
else:
Expand Down
16 changes: 4 additions & 12 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,6 @@
"backoff",
"cachetools",
"certifi",
"dataclasses;python_version<'3.7'",
"contextvars;python_version<'3.7'",
"dataclasses_json",
"deprecation",
"funcsigs",
Expand All @@ -69,20 +67,15 @@
"nest-asyncio",
"opentracing",
"numpy<2.0.0",
"pandas>1.0.0,<2.0.0;python_version<'3.7'",
"pandas>=1.4;python_version>'3.7'",
"pandas>=1.4",
"pydash<7.0.0",
"python-dateutil>=2.7.0",
"pytz==2024.1",
"requests",
"httpx>=0.23.3;python_version>'3.6'",
"scipy>=1.2.0;python_version>'3.8'",
"scipy>=1.2.0,<1.6.0;python_version<'3.7'",
"scipy>=1.2.0,<1.8.0;python_version<'3.8'",
"statsmodels<=0.12.2;python_version<'3.7'",
"statsmodels>=0.13.0;python_version>'3.6'",
"httpx>=0.23.3",
"scipy>=1.2.0",
"statsmodels>=0.13.0",
"tqdm",
"typing;python_version<'3.7'",
"websockets"
],
extras_require={
Expand All @@ -96,7 +89,6 @@
},
classifiers=[
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
Expand Down

0 comments on commit aef1115

Please sign in to comment.