{
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"id": "24212c68",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"DB = Arcade::Database-instance\n"
]
},
{
"data": {
"text/plain": [
"true"
]
},
"execution_count": 1,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"require_relative 'db-console'\n"
]
},
{
"cell_type": "code",
"execution_count": 8,
"id": "a91a107d",
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"Index[#313:0]:{0->}{->0}, SPX USD () "
],
"text/plain": [
"\"Index[#313:0]:{0->}{->0}, SPX USD () \""
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {},
"execution_count": 8,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"spx = Contract.first\n"
]
},
{
"cell_type": "markdown",
"id": "49d2051c",
"metadata": {},
"source": [
"Die Standard-IRuby Ausgabe für ein OHLC-Record"
]
},
{
"cell_type": "code",
"execution_count": 14,
"id": "49f480d2",
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"Trades[#386:2057] : {1->}{->1}
"
],
"text/plain": [
"\"Trades[#386:2057] : {1->}{->1}
\""
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/html": [
"
date | open | high | low | close | trades |
---|
2004-03-04 | 1150.61 | 1154.98 | 1149.8 | 1154.57 | 692 |
"
],
"text/plain": [
"\"date | open | high | low | close | trades |
---|
2004-03-04 | 1150.61 | 1154.98 | 1149.8 | 1154.57 | 692 |
\""
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {},
"metadata": {},
"output_type": "display_data"
},
{
"data": {},
"execution_count": 14,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"Ohlc.start_entry( spx ).first"
]
},
{
"cell_type": "markdown",
"id": "d1c21ee6",
"metadata": {},
"source": [
"Die Anfangsdaten der Datenreihen Trades und Vola für den SPX in Tabellenform"
]
},
{
"cell_type": "code",
"execution_count": 13,
"id": "5b6d1950",
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"CLASS | IN | OUT | RID | date | open | high | low | close | trades |
---|
Trades | 1 | 1 | #386:2057 | 2004-03-04 | 1150.61 | 1154.98 | 1149.8 | 1154.57 | 692 |
Trades | 2 | 1 | #389:2058 | 2004-03-05 | 1151.0 | 1163.23 | 1148.75 | 1157.34 | 1806 |
Trades | 2 | 1 | #392:2058 | 2004-03-08 | 1157.75 | 1160.12 | 1147.02 | 1147.02 | 1133 |
Trades | 2 | 1 | #395:2058 | 2004-03-09 | 1146.59 | 1146.81 | 1136.86 | 1140.67 | 1439 |
Trades | 2 | 1 | #398:2058 | 2004-03-10 | 1141.61 | 1142.05 | 1122.5 | 1124.1 | 1413 |
"
],
"text/plain": [
"\"CLASS | IN | OUT | RID | date | open | high | low | close | trades |
---|
Trades | 1 | 1 | #386:2057 | 2004-03-04 | 1150.61 | 1154.98 | 1149.8 | 1154.57 | 692 |
Trades | 2 | 1 | #389:2058 | 2004-03-05 | 1151.0 | 1163.23 | 1148.75 | 1157.34 | 1806 |
Trades | 2 | 1 | #392:2058 | 2004-03-08 | 1157.75 | 1160.12 | 1147.02 | 1147.02 | 1133 |
Trades | 2 | 1 | #395:2058 | 2004-03-09 | 1146.59 | 1146.81 | 1136.86 | 1140.67 | 1439 |
Trades | 2 | 1 | #398:2058 | 2004-03-10 | 1141.61 | 1142.05 | 1122.5 | 1124.1 | 1413 |
\""
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/html": [
"CLASS | IN | OUT | RID | date | open | high | low | close | volume | wap |
---|
Vola | 1 | 1 | #404:549 | 2006-01-06 | 0.15874508 | 0.15874508 | 0.15874508 | 0.15874508 | 1 | 0.15874508 |
Vola | 2 | 1 | #407:549 | 2006-01-09 | 0.10477175 | 0.1063592 | 0.10159685 | 0.1031843 | 1 | 0.10620046 |
Vola | 2 | 1 | #410:549 | 2006-01-10 | 0.1031843 | 0.1063592 | 0.1000094 | 0.10159685 | 1 | 0.10569247 |
Vola | 2 | 1 | #413:549 | 2006-01-11 | 0.10477175 | 0.10477175 | 0.09842195 | 0.10159685 | 1 | 0.10516861 |
Vola | 2 | 1 | #416:549 | 2006-01-12 | 0.1000094 | 0.1031843 | 0.0968345 | 0.10159685 | 1 | 0.10380341 |
"
],
"text/plain": [
"\"CLASS | IN | OUT | RID | date | open | high | low | close | volume | wap |
---|
Vola | 1 | 1 | #404:549 | 2006-01-06 | 0.15874508 | 0.15874508 | 0.15874508 | 0.15874508 | 1 | 0.15874508 |
Vola | 2 | 1 | #407:549 | 2006-01-09 | 0.10477175 | 0.1063592 | 0.10159685 | 0.1031843 | 1 | 0.10620046 |
Vola | 2 | 1 | #410:549 | 2006-01-10 | 0.1031843 | 0.1063592 | 0.1000094 | 0.10159685 | 1 | 0.10569247 |
Vola | 2 | 1 | #413:549 | 2006-01-11 | 0.10477175 | 0.10477175 | 0.09842195 | 0.10159685 | 1 | 0.10516861 |
Vola | 2 | 1 | #416:549 | 2006-01-12 | 0.1000094 | 0.1031843 | 0.0968345 | 0.10159685 | 1 | 0.10380341 |
\""
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"IRuby.display( Ohlc.start_entry( spx ).map{|y| IRuby.table( y.vector(5).map(&:html_attributes))})"
]
},
{
"cell_type": "markdown",
"id": "9de8d4a5",
"metadata": {},
"source": [
"Die Enddaten der Datenreihen Trades und Vola für den SPX in Tabellenform"
]
},
{
"cell_type": "code",
"execution_count": 15,
"id": "0a5fa214",
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"CLASS | IN | OUT | RID | date | open | high | low | close | trades |
---|
Trades | 2 | 0 | #398:24 | 2023-11-07 | 4366.21 | 4386.26 | 4355.41 | 4378.38 | 21528 |
Trades | 2 | 1 | #395:24 | 2023-11-06 | 4364.27 | 4372.21 | 4347.53 | 4365.98 | 21611 |
Trades | 2 | 1 | #392:24 | 2023-11-03 | 4334.23 | 4373.62 | 4334.23 | 4358.34 | 21667 |
Trades | 2 | 1 | #389:24 | 2023-11-02 | 4268.26 | 4319.72 | 4268.26 | 4317.78 | 21607 |
Trades | 2 | 1 | #386:24 | 2023-11-01 | 4201.27 | 4245.64 | 4197.74 | 4237.86 | 22064 |
"
],
"text/plain": [
"\"CLASS | IN | OUT | RID | date | open | high | low | close | trades |
---|
Trades | 2 | 0 | #398:24 | 2023-11-07 | 4366.21 | 4386.26 | 4355.41 | 4378.38 | 21528 |
Trades | 2 | 1 | #395:24 | 2023-11-06 | 4364.27 | 4372.21 | 4347.53 | 4365.98 | 21611 |
Trades | 2 | 1 | #392:24 | 2023-11-03 | 4334.23 | 4373.62 | 4334.23 | 4358.34 | 21667 |
Trades | 2 | 1 | #389:24 | 2023-11-02 | 4268.26 | 4319.72 | 4268.26 | 4317.78 | 21607 |
Trades | 2 | 1 | #386:24 | 2023-11-01 | 4201.27 | 4245.64 | 4197.74 | 4237.86 | 22064 |
\""
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/html": [
"CLASS | IN | OUT | RID | date | open | high | low | close | volume | wap |
---|
Vola | 2 | 0 | #422:24 | 2023-11-07 | 0.12382116 | 0.12699606 | 0.12223371 | 0.12223371 | 1 | 0.12710718 |
Vola | 2 | 1 | #419:24 | 2023-11-06 | 0.12540861 | 0.12858351 | 0.12382116 | 0.12540861 | 1 | 0.12855176 |
Vola | 2 | 1 | #416:24 | 2023-11-03 | 0.13334587 | 0.13334587 | 0.12540861 | 0.12699606 | 1 | 0.13299663 |
Vola | 2 | 1 | #413:24 | 2023-11-02 | 0.14763292 | 0.14763292 | 0.13493332 | 0.13493332 | 1 | 0.14722019 |
Vola | 2 | 1 | #410:24 | 2023-11-01 | 0.15874508 | 0.15874508 | 0.14604547 | 0.14604547 | 1 | 0.15812597 |
"
],
"text/plain": [
"\"CLASS | IN | OUT | RID | date | open | high | low | close | volume | wap |
---|
Vola | 2 | 0 | #422:24 | 2023-11-07 | 0.12382116 | 0.12699606 | 0.12223371 | 0.12223371 | 1 | 0.12710718 |
Vola | 2 | 1 | #419:24 | 2023-11-06 | 0.12540861 | 0.12858351 | 0.12382116 | 0.12540861 | 1 | 0.12855176 |
Vola | 2 | 1 | #416:24 | 2023-11-03 | 0.13334587 | 0.13334587 | 0.12540861 | 0.12699606 | 1 | 0.13299663 |
Vola | 2 | 1 | #413:24 | 2023-11-02 | 0.14763292 | 0.14763292 | 0.13493332 | 0.13493332 | 1 | 0.14722019 |
Vola | 2 | 1 | #410:24 | 2023-11-01 | 0.15874508 | 0.15874508 | 0.14604547 | 0.14604547 | 1 | 0.15812597 |
\""
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"IRuby.display( Ohlc.last_entry( spx ).map{|y| IRuby.table( y.vector(-5).map(&:html_attributes))})"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "99bf460d",
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"id": "4465d3b4",
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"id": "2269968c",
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"id": "96f15d3c",
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Ruby 3.2.0",
"language": "ruby",
"name": "ruby"
},
"language_info": {
"file_extension": ".rb",
"mimetype": "application/x-ruby",
"name": "ruby",
"version": "3.2.0"
}
},
"nbformat": 4,
"nbformat_minor": 5
}