Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Heston analytics #30

Merged
merged 2 commits into from
May 10, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions tf_quant_finance/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ py_library(
"//tf_quant_finance/math",
"//tf_quant_finance/models",
"//tf_quant_finance/rates",
"//tf_quant_finance/volatility",
],
)

Expand Down
2 changes: 2 additions & 0 deletions tf_quant_finance/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ def _ensure_tf_install(): # pylint: disable=g-statement-before-imports
from tf_quant_finance import math
from tf_quant_finance import models
from tf_quant_finance import rates
from tf_quant_finance import volatility
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure this module exists?

from tensorflow.python.util.all_util import remove_undocumented # pylint: disable=g-direct-tensorflow-import

_allowed_symbols = [
Expand All @@ -83,6 +84,7 @@ def _ensure_tf_install(): # pylint: disable=g-statement-before-imports
"experimental",
"math",
"models",
"volatility",
"rates",
]

Expand Down
4 changes: 4 additions & 0 deletions tf_quant_finance/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
"""TensorFlow Quantitative Finance tools to build Diffusion Models."""

from tf_quant_finance.models import euler_sampling
from tf_quant_finance.models import heston
from tf_quant_finance.models import heston_model
from tf_quant_finance.models import hull_white
from tf_quant_finance.models.generic_ito_process import GenericItoProcess
from tf_quant_finance.models.geometric_brownian_motion.multivariate_geometric_brownian_motion import MultivariateGeometricBrownianMotion
Expand All @@ -27,6 +29,8 @@

_allowed_symbols = [
'euler_sampling',
'heston',
'heston_model',
'HestonModel',
'hull_white',
'GenericItoProcess',
Expand Down
25 changes: 25 additions & 0 deletions tf_quant_finance/models/heston/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Lint as: python3
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""TensorFlow Quantitative Finance tools to build Hull White type models."""

from tf_quant_finance.models.heston import approximations

from tensorflow.python.util.all_util import remove_undocumented # pylint: disable=g-direct-tensorflow-import

_allowed_symbols = [
'approximations',
]

remove_undocumented(__name__, _allowed_symbols)
24 changes: 24 additions & 0 deletions tf_quant_finance/models/heston/approximations/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Lint as: python3
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""Approximations to the Heston European option price."""

from tf_quant_finance.models.heston.approximations.heston import eu_option_price
from tensorflow.python.util.all_util import remove_undocumented # pylint: disable=g-direct-tensorflow-import

_allowed_symbols = [
'eu_option_price',
]

remove_undocumented(__name__, _allowed_symbols)
Loading