Machine learning in trading: theory, models, practice and algo-trading - page 3603

 
mytarmailS #:

It is impossible to create a normal forum about the MoD without normal MoD specialists....

And normal experts even laugh at the word crypto, not to mention forex.

Imho, this is laughter through tears. You can take data from normal forex (not our retail forex) and try to forecast them.

Epigraph to the forex market review from the BIS Bank website:

Foreign exchange spot is the simplest
asset class one can trade, yet it has the
most complex trading environment.
Quote from an executive at a major FX liquidity provider

 
Uladzimir Izerski #:

I can see that.))

That's why I pasted the post.

Apparently it's only for a select few. It's still not available to me.

 
Aleksey Nikolayev #:

Imho, it would be useful to compare economic conditions (macroeconomic indicators) at different sites.

I don't have the data. I gave a link where you can get them, but there you need a key after registration, which should be sent - I am ignored.

 
Aleksey Vyazmikin #:

I don't have the data. I gave a link where you can get them, but there you need a key after registration, which should be sent - I am ignored.

We have a wonderful calendar in MT5, don't we?
 

Asked a question on yandex and got answers that puzzled me:


можно ли запустить несколько экземпляров R без установки


Да, можно запустить несколько экземпляров R без установки. 

Это возможно благодаря использованию виртуальных сред, таких как Conda или virtualenv, которые позволяют создавать изолированные окружения для запуска программ, включая R. 

Виртуальные среды обеспечивают изоляцию зависимостей и версий библиотек, что позволяет избежать конфликтов между различными проектами, использующими разные версии R или его пакетов.


а без виртуальных сред


К сожалению, без использования виртуальных сред, напрямую запустить несколько экземпляров R на одном компьютере без установки невозможно. 
Это связано с тем, что R является программным обеспечением, которое требует установки на компьютер для его использования.

Is this really true? Is Yandex right?

 
СанСаныч Фоменко #:

Asked a question on yandex and got answers that puzzled me:


Is this really true? Is Yandex right?

I opened two terminals (I mean console, not MT), ran R in each. Both work, separately. Linux.
 
Aleksey Vyazmikin #:

I'm open to new ideas. You can just upload a script and not bother.

In the last example, yes, in general. In other variants, the strategy builds the marks. It is based on the logic of price behaviour and my observations.

from sklearn.cluster import KMeans, BisectingKMeans
import pandas as pd


def fix_labels_subset_mean(dataset, n_clusters=100, subset_size=10) -> pd.DataFrame:
    # Применяем KMeans для кластеризации
    dataset['clusters'] = KMeans(n_clusters=n_clusters).fit(dataset[dataset.columns[:-1]]).labels_

    # Вычисляем среднее значение 'labels' для каждого кластера
    cluster_means = dataset.groupby('clusters')['labels'].mean()

    # Сортируем кластеры по их средним значениям и выбираем те, которые наиболее далеки от 0.5
    sorted_clusters = cluster_means.sub(0.5).abs().sort_values(ascending=False).index[:subset_size]

    # Создаем словарь для отображения средних значений в новые значения только для выбранных кластеров
    mean_to_new_value = {cluster: 0.0 if mean < 0.5 else 1.0 for cluster, mean in cluster_means.items() if cluster in sorted_clusters}

    # Применяем изменения к исходным значениям 'labels' только для выбранных кластеров
    dataset['labels'] = dataset.apply(lambda row: mean_to_new_value[row['clusters']] if row['clusters'] in mean_to_new_value else row['labels'], axis=1)

    dataset = dataset.drop(columns=['clusters'])
    return dataset


Forward 5 years:


Apparently no one reads, only flud in the topic.

H.Y. The other methods (link to chat with prompts) are gone. But by analogy you can come up with your own.

 
Aleksey Nikolayev #:
I opened two terminals (I mean console, not MT), ran R in each terminal. Both work, separately. Linux.

Works for me for many years.

But recently I started to compare the results of calculations and was surprised to see that there are the same results on the same data, and there are different ones.

The reason is not clear.

 

The larger subset_size is in relation to the number of clusters, the more curved the curves are, but more stable in their curvature on new data. And vice versa.

For example:

n_clusters=500, subset_size=200

The reverse situation:

n_clusters=500, subset_size=50

n_clusters=500, subset_size=10


 

Last example. Parameters can be adjusted.

n_clusters=20, subset_size=5