From 8527296f3e1918811e27e5a3e759537f7cc1ad72 Mon Sep 17 00:00:00 2001 From: CoprDistGit Date: Wed, 31 May 2023 05:27:52 +0000 Subject: automatic import of python-opstrat --- .gitignore | 1 + python-opstrat.spec | 182 ++++++++++++++++++++++++++++++++++++++++++++++++++++ sources | 1 + 3 files changed, 184 insertions(+) create mode 100644 python-opstrat.spec create mode 100644 sources diff --git a/.gitignore b/.gitignore index e69de29..49e38a7 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1 @@ +/opstrat-0.1.7.tar.gz diff --git a/python-opstrat.spec b/python-opstrat.spec new file mode 100644 index 0000000..39451d5 --- /dev/null +++ b/python-opstrat.spec @@ -0,0 +1,182 @@ +%global _empty_manifest_terminate_build 0 +Name: python-opstrat +Version: 0.1.7 +Release: 1 +Summary: Option stategy visualizer +License: MIT +URL: https://github.com/hashabcd/opstrat +Source0: https://mirrors.nju.edu.cn/pypi/web/packages/2d/40/9bde4fc68a5f45f0763bbc11fd4ba49cb56c0c8e9cdaa2d386bca17cb397/opstrat-0.1.7.tar.gz +BuildArch: noarch + +Requires: python3-matplotlib +Requires: python3-pandas +Requires: python3-numpy +Requires: python3-seaborn +Requires: python3-yfinance + +%description +op_type: kind {'c','p'}, default:'c'
+   Opion type>> 'c': call option, 'p':put option +spot: int, float, default: 100
+  Spot Price +spot_range: int, float, optional, default: 5
+  Range of spot variation in percentage +strike: int, float, default: 102
+  Strike Price +tr_type: kind {'b', 's'} default:'b'
+  Transaction Type>> 'b': long, 's': short +op_pr: int, float, default: 10
+  Option Price +### 1.a Default plot +Option type : Call
+Spot Price : 100
+Spot range : +/- 5%
+Strike price: 102
+Position : Long
+Option Premium: 10
+```python +op.single_plotter() +``` +![png](https://raw.githubusercontent.com/abhijith-git/opstrat/main/readme_files/fig1.png) +Green : Profit
Red : Loss +### 1.b Input parameters +Strike Price : 450
+Spot price : 460
+Option type : Put Option
+Position : Short
+Option Premium : 12.5
+```python +op.single_plotter(spot=460, strike=460, op_type='p', tr_type='s', op_pr=12.5) +``` +![png](https://raw.githubusercontent.com/abhijith-git/opstrat/main/readme_files/fig2.png) +# 2. multi_plotter() +Used for plotting a single option
+ +%package -n python3-opstrat +Summary: Option stategy visualizer +Provides: python-opstrat +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-pip +%description -n python3-opstrat +op_type: kind {'c','p'}, default:'c'
+   Opion type>> 'c': call option, 'p':put option +spot: int, float, default: 100
+  Spot Price +spot_range: int, float, optional, default: 5
+  Range of spot variation in percentage +strike: int, float, default: 102
+  Strike Price +tr_type: kind {'b', 's'} default:'b'
+  Transaction Type>> 'b': long, 's': short +op_pr: int, float, default: 10
+  Option Price +### 1.a Default plot +Option type : Call
+Spot Price : 100
+Spot range : +/- 5%
+Strike price: 102
+Position : Long
+Option Premium: 10
+```python +op.single_plotter() +``` +![png](https://raw.githubusercontent.com/abhijith-git/opstrat/main/readme_files/fig1.png) +Green : Profit
Red : Loss +### 1.b Input parameters +Strike Price : 450
+Spot price : 460
+Option type : Put Option
+Position : Short
+Option Premium : 12.5
+```python +op.single_plotter(spot=460, strike=460, op_type='p', tr_type='s', op_pr=12.5) +``` +![png](https://raw.githubusercontent.com/abhijith-git/opstrat/main/readme_files/fig2.png) +# 2. multi_plotter() +Used for plotting a single option
+ +%package help +Summary: Development documents and examples for opstrat +Provides: python3-opstrat-doc +%description help +op_type: kind {'c','p'}, default:'c'
+   Opion type>> 'c': call option, 'p':put option +spot: int, float, default: 100
+  Spot Price +spot_range: int, float, optional, default: 5
+  Range of spot variation in percentage +strike: int, float, default: 102
+  Strike Price +tr_type: kind {'b', 's'} default:'b'
+  Transaction Type>> 'b': long, 's': short +op_pr: int, float, default: 10
+  Option Price +### 1.a Default plot +Option type : Call
+Spot Price : 100
+Spot range : +/- 5%
+Strike price: 102
+Position : Long
+Option Premium: 10
+```python +op.single_plotter() +``` +![png](https://raw.githubusercontent.com/abhijith-git/opstrat/main/readme_files/fig1.png) +Green : Profit
Red : Loss +### 1.b Input parameters +Strike Price : 450
+Spot price : 460
+Option type : Put Option
+Position : Short
+Option Premium : 12.5
+```python +op.single_plotter(spot=460, strike=460, op_type='p', tr_type='s', op_pr=12.5) +``` +![png](https://raw.githubusercontent.com/abhijith-git/opstrat/main/readme_files/fig2.png) +# 2. multi_plotter() +Used for plotting a single option
+ +%prep +%autosetup -n opstrat-0.1.7 + +%build +%py3_build + +%install +%py3_install +install -d -m755 %{buildroot}/%{_pkgdocdir} +if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi +if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi +if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi +if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi +pushd %{buildroot} +if [ -d usr/lib ]; then + find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/lib64 ]; then + find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/bin ]; then + find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/sbin ]; then + find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst +fi +touch doclist.lst +if [ -d usr/share/man ]; then + find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst +fi +popd +mv %{buildroot}/filelist.lst . +mv %{buildroot}/doclist.lst . + +%files -n python3-opstrat -f filelist.lst +%dir %{python3_sitelib}/* + +%files help -f doclist.lst +%{_docdir}/* + +%changelog +* Wed May 31 2023 Python_Bot - 0.1.7-1 +- Package Spec generated diff --git a/sources b/sources new file mode 100644 index 0000000..3096ba2 --- /dev/null +++ b/sources @@ -0,0 +1 @@ +25729444568976d0558f46c48d9174e6 opstrat-0.1.7.tar.gz -- cgit v1.2.3