Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
A
alpha-mind
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Dr.李
alpha-mind
Commits
35e2da4c
Commit
35e2da4c
authored
Jul 11, 2017
by
Dr.李
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added self defined risk bound
parent
f4e68e0e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
+6
-3
factoranalysis.py
alphamind/analysis/factoranalysis.py
+6
-3
No files found.
alphamind/analysis/factoranalysis.py
View file @
35e2da4c
...
...
@@ -76,7 +76,6 @@ class FDataPack(object):
self
.
raw_factors
=
raw_factors
if
d1returns
is
not
None
:
self
.
d1returns
=
d1returns
.
flatten
()
else
:
...
...
@@ -196,8 +195,12 @@ def factor_analysis(factors: pd.DataFrame,
if
is_tradable
is
not
None
:
ubound
[
~
is_tradable
]
=
0.
risk_lbound
=
benchmark
@
risk_exp
risk_ubound
=
benchmark
@
risk_exp
if
'risk_bound'
in
kwargs
:
risk_lbound
=
kwargs
[
'risk_bound'
][
0
]
risk_ubound
=
kwargs
[
'risk_bound'
][
1
]
else
:
risk_lbound
=
benchmark
@
risk_exp
risk_ubound
=
benchmark
@
risk_exp
weights
=
build_portfolio
(
er
,
builder
=
'linear'
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment