Skip to content

Commit

Permalink
Update 9. Rebalancing Positions.ipynb
Browse files Browse the repository at this point in the history
Improve wording.
  • Loading branch information
edtechre committed Jun 24, 2024
1 parent a8f511f commit 10d77bd
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions docs/source/notebooks/9. Rebalancing Positions.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,9 @@
"id": "ef4d6cfd",
"metadata": {},
"source": [
"If the current allocation is above the target level, the function will sell some shares of the asset, while if the current allocation is below the target level, the function will buy some shares of the asset.\n",
"If the current allocation is above the target level, the function will sell the needed shares of the asset, while if the current allocation is below the target level, the function will buy the needed shares of the asset.\n",
"\n",
"Following that, we write a ``rebalance`` function to set each asset to an equal target allocation at the beginning of each month:"
"Following that, we write a ``rebalance`` function to target each stock to an equal allocation at the beginning of every month:"
]
},
{
Expand All @@ -121,7 +121,7 @@
"id": "bb714864",
"metadata": {},
"source": [
"Now that we have implemented the ``rebalance`` function, the next step is to backtest our rebalancing strategy using five different stocks in our portfolio. To process all stocks at once on each bar of data, we will use the [Strategy#set_after_exec](https://www.pybroker.com/en/latest/reference/pybroker.strategy.html#pybroker.strategy.Strategy.set_after_exec) method:"
"Now that we have implemented the ``rebalance`` function, the next step is to backtest our rebalancing strategy using a portfolio of five stocks. To process all stocks at once on each bar of data, we will use the [Strategy#set_after_exec](https://www.pybroker.com/en/latest/reference/pybroker.strategy.html#pybroker.strategy.Strategy.set_after_exec) method:"
]
},
{
Expand Down Expand Up @@ -360,7 +360,7 @@
"source": [
"## Portfolio Optimization\n",
"\n",
"[Portfolio optimization](https://en.wikipedia.org/wiki/Portfolio_optimization) can guide our rebalancing in order to meet some objective for our portfolio. For instance, we can use portfolio optimization with the goal of allocating assets in a way to minimize risk.\n",
"[Portfolio optimization](https://en.wikipedia.org/wiki/Portfolio_optimization) can guide our rebalancing in order to meet some objective for our portfolio. For instance, we can use portfolio optimization with the goal of allocating stocks in a way to minimize risk.\n",
"\n",
"[Riskfolio-Lib](https://riskfolio-lib.readthedocs.io/) is a popular Python library for performing portfolio optimization. Below shows how to use it to construct a minimum risk portfolio by minimizing the portfolio's [Conditional Value at Risk (CVar)](https://www.investopedia.com/terms/c/conditional_value_at_risk.asp) based on the past year of returns:"
]
Expand Down Expand Up @@ -411,7 +411,7 @@
"id": "bec587f2",
"metadata": {},
"source": [
"You can find more information and examples of using [Riskfolio-Lib](https://riskfolio-lib.readthedocs.io/) on the official documentation. Now, let's move on to backtesting the strategy!"
"You can find more information and examples of using [Riskfolio-Lib](https://riskfolio-lib.readthedocs.io/) on its official documentation. Now, let's move on to backtesting the strategy!"
]
},
{
Expand Down

0 comments on commit 10d77bd

Please sign in to comment.